GNU bug report logs - #19604
echo --help does not work

Previous Next

Package: coreutils;

Reported by: prateek goyal <prateek.goyal5 <at> gmail.com>

Date: Thu, 15 Jan 2015 07:06:01 UTC

Severity: normal

Tags: notabug

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: prateek goyal <prateek.goyal5 <at> gmail.com>
To: Eric Blake <eblake <at> redhat.com>
Cc: 19604 <at> debbugs.gnu.org, Pádraig Brady <P <at> draigbrady.com>
Subject: bug#19604: echo --help does not work
Date: Thu, 15 Jan 2015 21:25:51 +0530
[Message part 1 (text/plain, inline)]
So even if I execute following command, it gives same result:

env POSIXLY_CORRECT=1 echo --help

prateek <at> prateek-pc:~/Documents/awk$ env POSIXLY_CORRECT=1 echo --help
--help

Thanks,
prateek

On 15 January 2015 at 19:39, Eric Blake <eblake <at> redhat.com> wrote:

> On 01/15/2015 04:36 AM, Pádraig Brady wrote:
> > tag 19604 notabug
> > close 19604
> > stop
> >
> > On 15/01/15 06:20, prateek goyal wrote:
> >> Hi,
> >>
> >>
> >> when I try to use --help option with echo command, it does not print
> help contents, but prints "--help".
> >>
> >>
> >> prateek <at> prateek-pc:~/Documents/awk$ echo --help
> >> --help
> >
> > You're actually using your shell's echo there.
> > To use the coreutils one:
> >
> >   env echo --help
>
> Furthermore, the behavior you saw in your shell is required by POSIX.
> If you do 'env POSIXLY_CORRECT=1 echo --help', you will get the same
> behavior from coreutils as you did from your shell.  'echo' is one of
> the few utilities that _cannot_ honor --help for compatibility reasons.
>
>
> > Note newer versions of bash will support $builtin --help,
> > though I've not tested the echo case which would
> > introduce a change in behavior.
>
> If bash changes the behavior of 'echo --help' in POSIX mode, then that
> would be a bug in bash.
>
> --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
>


-- 

*Thanks,Prateek Goyal*
[Message part 2 (text/html, inline)]

This bug report was last modified 10 years and 131 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.