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 -->
  #1 (permalink)  
Old 06-27-2005
hugow hugow is offline
Registered User
 

Join Date: Jun 2005
Posts: 15
Error in for loop?

Hi,

Working on AIX using the following for loop.

for a in `find /edi/iTracTEST/sessions -name nohup.out -print`
do
echo $a
done

On the command line it works fine, but insert the code in a file and then running it, it does not want to work. I get the following back.


' is not expected.s2.sh: 0403-057 Syntax error at line 3 : `do

Please advice
Reply With Quote
Forum Sponsor