Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:11 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc