[Linux-disciples] Equivalent bash syntaxes

Adam Rosi-Kessel adam at rosi-kessel.org
Wed Jul 30 23:58:21 EDT 2008


Stephen R Laniel wrote, on 7/30/2008 9:57 PM:
> On Wed, Jul 30, 2008 at 10:14:03PM -0400, Chung-chieh Shan wrote:
>> "test" and "[ ... ]" are synonymous.
> 
> I tried to figure out the other day who
> put /usr/bin/[ there. Nada:
> 
> | (22:55) slaniel at slaniel-laptop:~$ dlocate /usr/bin/[
> | (22:56) slaniel at slaniel-laptop:~$ 
> 
> Does anyone know which package puts it
> there?

I believe it's part of bash. It's listed in help as a builtin. I 
actually am not convinced that you are actually executing /usr/bin/[ 
when use the [ syntax.

Let's see, apparently not:

whitehail:~>echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/home/adam/bin:/home/adam/scripts:.:/usr/lib/surfraw:/usr/bin/surfraw-elvi
whitehail:~>export PATH=:
whitehail:~>[ 1 ] && echo hi
hi


More information about the Linux-disciples mailing list