The UNIX and Linux Forums  

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



Thread: help with Loop
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 02-01-2002
LivinFree's Avatar
LivinFree LivinFree is offline
Goober Extraordinaire
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
Try a for loop...

for each in 1 2 3
do
echo $each
done

for files in `ls`
do
echo $files
done

That will loop through each entry in the list, doing whatever you want with it...