"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). >Speaking of builtin commands vs. Unix commands. >While setting the PATH environment variable in a script is a good idea, >specifying the full path to a standard command may be a better way. The >user may have aliased the commands: >alias rm='rm -i' >So, in your script (or makefile), setting a variable for the command will >bypass any aliases: >RM=/bin/rm Or RM=\rm so that aliasing is negated. I don't alias rm and my root accounts don't either. > >Same with any other Unix command. > >So, for the reason of unpredictable aliases, >X=$(/usr/bin/ls) >Is the more predicatable way to proceed. Maybe. Now if I'm trying to run gnutar, on linux, it's /usr/bin/tar. On my solaris box it depends on the site. I've seen /usr/local/bin, /opt/ something, /usr/local/gnu, /local, etc. Even variations for each archetecture. I've also seen it called gtar or gnutar. It depends, of course, on your environment. Sometimes you want the full path, sometimes not. Specifying the full path for each program makes portability more difficult (think #ifdef in C). SunOS puts many programs in /usr/ccs for instance. Solaris has stuff in /usr/ucb. HP-UX and SGI use /usr/ bsd. -- ------- Tom Buskey ***************************************************************** To unsubscribe from this list, send mail to [EMAIL PROTECTED] with the text 'unsubscribe gnhlug' in the message body. *****************************************************************