思ってたのと違う。echoのヘルプの見方

echoコマンドのヘルプを見たいので、helpコマンドを打ってみた。

kei-c@DESKTOP-HNNRMPU MINGW64 ~/ (master)  
$ echo --help  
--help  

wikiより

Unixなどのシステムにあるechoコマンドは、入力として引数で与えられた文字列を、そのまま出力するコマンドである。

なるほど。--helpがechoの引数になってしまうんですね。

Linuxではすべてがファイルとして表されるので、echoファイルのヘルプを見てあげればよさそうです。 ということで正解はこちら

$ /bin/echo --help
Usage: /bin/echo [SHORT-OPTION]... [STRING]...
  or:  /bin/echo LONG-OPTION
Echo the STRING(s) to standard output.

  -n             do not output the trailing newline
  -e             enable interpretation of backslash escapes
  -E             disable interpretation of backslash escapes (default)
      --help     display this help and exit
      --version  output version information and exit

If -e is in effect, the following sequences are recognized:

  \\      backslash
  \a      alert (BEL)
  \b      backspace
  \c      produce no further output
  \e      escape
  \f      form feed
  \n      new line
  \r      carriage return
  \t      horizontal tab
  \v      vertical tab
  \0NNN   byte with octal value NNN (1 to 3 digits)
  \xHH    byte with hexadecimal value HH (1 to 2 digits)

NOTE: your shell may have its own version of echo, which usually supersedes
the version described here.  Please refer to your shell's documentation
for details about the options it supports.

GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Report any translation bugs to <https://translationproject.org/team/>
Full documentation <https://www.gnu.org/software/coreutils/echo>
or available locally via: info '(coreutils) echo invocation'