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

Shell scripting in Bash



I have been trying to learn shell scripting using the man page for bash.
Asside from the need for a lot of reading between the lines, there seem to
be several errors. == is declared to be the equality operator, but = is
the correct syntax. || is declared to be the or operator, but although:

if [ a != b ]

works fine

if [ a != b || c != d ]

fails with several errors ( ']' not found, and != command not found )

I have tried to enclose the expressions in {} with the same results.

What is the correct syntax for this kind of statement?

TIA,

Dwarf

------------                                          --------------

aka   Dale Scheetz                   Phone:   1 (904) 877-0257
      Flexible Software              Fax:     NONE 
      Black Creek Critters           e-mail:  dwarf@polaris.net

------------ If you don't see what you want, just ask --------------


Reply to: