The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 09-04-2001
rwb1959's Avatar
rwb1959 rwb1959 is offline
Registered User
 

Join Date: Aug 2001
Location: Virginia, USA
Posts: 438
The use of square brackets is another way
of using the "test" command. Note on the
square brackets... You must have a white
space after the open bracket and before the
close bracket: [ "$somevar" = "somestring" ]

The code: if "$all_recs" = "ALL"; then

...neither had the "test" nor the [ ] and you
need one OR the other.