View Single Post
Old 2004-07-13, 11:16 PM   #12
airdick
Shut up brain, or I'll stab you with a Q-tip!
 
Join Date: Aug 2003
Posts: 114
Quote:
Originally posted by spacemanspiff

So how do I tell it to read from a file, one line at a time and then "do" something with each line.
Here is an example of a bourne shell "for loop" that does something with each item in domains.txt:

for var in `cat domains.txt`
do
echo $var
done

More info here:
http://unix.about.com/library/course/blshscript-l7a.htm
airdick is offline   Reply With Quote