Re: Help with first bash script please

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

 



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


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux