What is /bin/[

I noticed there is file /bin/[.
Anybody know what is this file?
Because of location, if I understand correctly it is part of base system.
Why it is named so "funny"?

System:
>uname -r
7.2-RELEASE-p1
> uname -m
i386
 
[(1)

When you run a script, i.e.:
Code:
if [ "hello" == "${world}" ]; then
   echo "Hello world"
fi

Then `[' is just a command. It is the same as the test command (Actually, they are hard links, use ls -i on them and they have the same inode) so you can also write:
Code:
if test 'hello' == ${world} ]; then

But [ is better because it is easier to read.
 
Back
Top