Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11547

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

From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups gnu.bash.bug
Subject Re: '[ --version' should give output, instead a bash error missing re: missing ']'
Date 2015-09-22 12:51 -0400
Message-ID <mailman.1612.1442940682.19560.bug-bash@gnu.org> (permalink)
References <CAJfq-nMp2PSiTg+=+fA8HxuZU6tD7HAGPZFPJvdiUMAWRt1N5A@mail.gmail.com> <56017620.4010303@redhat.com> <CAJfq-nNm2yk27CQbPwZ7O9PyXh0Qo+PO1eYSqAQNmQvFg5KNGA@mail.gmail.com>

Show all headers | View raw


On Tue, Sep 22, 2015 at 11:46:05AM -0500, Daniel Simeone wrote:
>  When I ran 'which ['  it stated that the /usr/bin/[ was what was running,
> and so I presumed it was in bash.

which(1) is an external program, so it doesn't know about shell builtins.
Use "type [" in bash intead.  I'm quite fond of type -a:

$ type -a [
[ is a shell builtin
[ is /usr/bin/[

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: '[ --version' should give output, instead a bash error missing re: missing ']' Greg Wooledge <wooledg@eeg.ccf.org> - 2015-09-22 12:51 -0400

csiph-web