=>"Jerry Feldman" said:
=>>Actually, [ is a link to test. Linux uses a symlink, some Unixes use hard
=>>links.
=>>-rwxr-xr-x 1 root root 17496 Sep 20 2001 /usr/bin/test
=>>lrwxrwxrwx 1 root root 4 Dec 1 13:42 /usr/bin/[ -> test
=>>
=>>And yes, BASH has it built in, but on some of the older Bourne shells it is
=>>not built in.
=>
=>As I said in not so many words, modern shells have it built in. I don't
=>consider Bourne a modern shell. If I want test, I use test, not [.
=>I've also used versions of Bourne that didn't have functions for
=>instance (Ultrix).
Just to muddy the waters even further...
Bourne shell under Linux is actually a link to bash. Both the [ operator
and the test command are both builtins to both Bourne and bash. The [[
operator is actually different from a builtin; it is considered a keyword.
It also has different syntax in that certain operators are not legal and
vice versa. If you ever really and truly ever want to run the binary test
(though I have no idea why you would), you have to explicity invoke it via
pathname. e.g.,
if /usr/bin/test "${x}" -eq 44
then
echo walla
fi
--
-Time flies like the wind. Fruit flies like a banana. Stranger things have -
-happened but none stranger than this. Does your driver's license say Organ
-Donor?Black holes are where God divided by zero. Listen to me! We are all-
-individuals! What if this weren't a hypothetical question? [EMAIL PROTECTED]
*****************************************************************
To unsubscribe from this list, send mail to [EMAIL PROTECTED]
with the text 'unsubscribe gnhlug' in the message body.
*****************************************************************