I tried 'man echo' in Bash and it told me that 'echo --help' will display help then exit, and similarly, that 'echo --version' will output version and exit. But why it doesn't work ? 'echo --help' just simply prints '--help' literally.
To access the
echo program, rather than the builtin, you can either give a path to it:
or use Bash's
enable command to disable the built-in version:
$ enable -n echo $ echo --help
Bash has built-in versions of a lot of basic commands, because it's a little faster to do that, but you can always bypass them like this when you need to.
In addition to other answers, you can use
$ help echo
too see a brief help for built-in
You are using the
echo built-in command of bash, which does not understand the
--help option. Use:
To see the help for the built-in
man bash and search for