The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 12-06-2007
fpmurphy fpmurphy is offline
Moderator
 

Join Date: Dec 2003
Location: /dev/fl
Posts: 1,125
Your code snippet works for me. If you wish to use some other means of testing for an empty string you can always using the test utility. Man test(1) for more information.

Code:
set nmlfilelist

[ -z $nmlfilelist ] && echo "nmllist is empty"; exit (1)
Reply With Quote