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

Re: [ in /usr/bin Question



Joe Hart <j.hart@orange.nl> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tom Grove wrote:
Hello all...I am new to this Debian thing :-)  I used it in the Woody
days but moved over to the FreeBSD world for the last few years.  I
recently installed Testing (Lenny) and see the left bracket in my
/usr/bin directory and do not know what it is.  When I ls -al it I get:

-rwxr-xr-x 1 root root 24752 2007-01-30 13:51 /usr/bin/[

This leads me to believe that it was installed with the base system or
some package because I just installed the system earlier this week.  Any
help is much appreciated.  Thanks.

I also have this file, and when I type man [, the manual for test shows
up.  Now why this is I have no idea.  If I try the command (since it is
executable) I get :  bash: [: missing `]'

This is beyond my comprehension.

Joe

Now I get it, it's as said before "test" and it's used to test something.
It is used mostly for bash scripting

e.g. if [`command`=="outputwewant"]
       do something
     fi
--
bdeferme@paradize.be
www.paradize.be




Reply to: