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

Re: Help with first bash script please



Paul Howarth wrote:
Graham Cossey wrote:


I also find it useful to think of the "[" in the "if" statement:


if [ x = y ]; then ...

as being the same as the command "test" (see man test). When you think of it ("[") as a command (which it is), the need for a space after it is more obvious in my mind.

Paul.


So much so that '[' is a sym link to test:


ls -l /usr/bin/[
lrwxrwxrwx  1 root root 4 Mar 13  2004 /usr/bin/[ -> test



Serge


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