[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: |
Greg Wooledge |
Subject: |
Re: '[ --version' should give output, instead a bash error missing re: missing ']' |
Date: |
Tue, 22 Sep 2015 12:51:15 -0400 |
User-agent: |
Mutt/1.4.2.3i |
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/[