Jun 9, 2017

Bash: The most useless commands (2)

The last posting about useless commands for bash discussed the command
rev
. One nice comment pointed out, that the rev command can be used for searching inside logfiles (Thanks to phoxis.org).

Like it was said there, the command
yes
looks even more useless:
NAME
       yes - output a string repeatedly until killed
SYNOPSIS
       yes [STRING]...
Ok - it can be used for scripts to answer call backs. But which kind of script needs always the same answer? (and commands like "apt-get" support this via the option "-y".

Any other suggestions about useless bash commands?

4 comments:

  1. Hi,

    what about the sl command?

    ReplyDelete
  2. Just one clarification. Those are NOT bash commands. Neither is ls a "bash command". They are programs that come with most Unix / Linux installations. They can be used from any shell (csh, sh, zsh ...).

    ReplyDelete
  3. You are right. The shown commands are not specific to bash. You can run them on any linux shell.

    I added a post with the bash builtin commands:
    http://dietrichschroff.blogspot.de/2017/06/bash-most-useless-commands-5.html

    ReplyDelete
  4. 'yes' is e.g. quite usefull if running several program one after another, which all want answers, like `yes | (cmd1; cmd2; …)`

    ReplyDelete