4 ms·
In some shells (such as tcsh) it is a built-in command like "if" or "cd".
by cduan 17y ago
In some shells (such as tcsh) it is a built-in command like "if" or "cd".
- andrewcooke 17y agoyeah, i wondered about that (in bash it's /bin/echo, fwiw - i looked).
- thwarted 17y agoHuh? /bin/echo is an executable, all shells should invoke that binary when given a path to it. In bash, echo is a builtin (it appears in the SHELL BUILTIN COMMANDS section of the man page between disown and enable). bash$ echo --help # the builtin --help bash$ /bin/echo --help # the executable Usage: /bin/echo [SHORT-OPTION]... [STRING]... or: /bin/echo LONG-OPTION Echo the STRING(s) to standard output. (and a bunch of other GNU help text)
- andrewcooke 17y agoah, ok. that makes sense. i just did "which echo" without thinking enough....
- tome 17y agoTry "type echo". If "which" is not a builtin (which it isn't in bash, but is in zsh) then it can't tell you about builtins!