bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: '[ --version' should give output, instead a bash error missing re: m


From: Eric Blake
Subject: Re: '[ --version' should give output, instead a bash error missing re: missing ']'
Date: Tue, 22 Sep 2015 09:39:12 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]