[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19604: echo --help does not work
From: |
Bernhard Voelker |
Subject: |
bug#19604: echo --help does not work |
Date: |
Fri, 16 Jan 2015 10:49:06 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
On 01/15/2015 04:55 PM, prateek goyal wrote:
So even if I execute following command, it gives same result:
address@hidden:~/Documents/awk$ env POSIXLY_CORRECT=1 echo --help
--help
That is exactly what Eric said before: POSIX mandates to literally
output the string "--help" - which coreutils' echo does if the variable
POSIXLY_CORRECT is set. Otherwise, the implementation extends the
functionality and adheres to GNU standards which mandates to honor
the "--help" option to output the usage message:
$ env --unset=POSIXLY_CORRECT echo --help
Usage: ...
Maybe you were confused by the use of the 'env' utility.
You'll get the same by specifying the echo with it's absolute path:
$ which echo
/usr/bin/echo
$ unset POSIXLY_CORRECT
$ /usr/bin/echo --help
Usage: [...]
Have a nice day,
Berny