You are correct:

/usr/bin/\[ --help
gives the desired output.

 When I ran 'which ['  it stated that the /usr/bin/[ was what was running,
and so I presumed it was in bash.

Also, the error message says 'bash'

So, all in all, a bit counfusing.

Cheers,
Daniel



On 22 September 2015 at 10:39, Eric Blake <ebl...@redhat.com> wrote:

> On 09/22/2015 08:22 AM, Daniel Simeone wrote:
> >
> > Description:
> >         According to the joint man page for '[' and 'test', '[ --version'
> > and '[ --help' should give appropriate output, while 'test' should not.
>
> You're probably reading the coreutils man page, rather than the bash man
> page.
>
> Bash has not (yet) implemented support for ANY --options to its
> builtins, although there has been talk on the list of doing so for
> future versions (especially since ksh has already done it).  If you are
> executing the shell builtins instead of the coreutils versions, then the
> behavior you see is expected and not a bug.
>
> To see the behavior mentioned in the coreutils man page, be sure you run
> the coreutils version of [, as in:
>
> env [ --help
> or
> /bin/[ --help
>
> --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
>


-- 
--Daniel Simeone
PhD candidate,
Candidat au doctorat,
Université McGill University

Reply via email to