钻牛角尖的一个问题: 怎么查看 echo --help
发表于 : 2011-10-25 18:59
同理 echo --version


以下摘自man bash: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.
也就是说bash内建的命令echo不支持--help --version参数的。
echo [-neE] [arg ...]
Output the args, separated by spaces, followed by a newline.
The return status is always 0. If -n is specified, the trailing
newline is suppressed. If the -e option is given, interpreta‐
tion of the following backslash-escaped characters is enabled.
The -E option disables the interpretation of these escape char‐
acters, even on systems where they are interpreted by default.
The xpg_echo shell option may be used to dynamically determine
whether or not echo expands these escape characters by default.
echo does not interpret -- to mean the end of options. echo
interprets the following escape sequences:
...
代码: 全选
/bin/echo --help
/bin/echo --version