Christopher Sawtell wrote:
http://personal.riverusers.com/~thegrendel/abs-guide-4.1.tar.bz2
Chapter 10.
for arg in [list]
do
command(s)...
done
I've read it, I understand how to iterate thru a list...
eg: for planet in Mercury Venus Earth Mars Jupiter Saturn Uranus
Neptune Pluto
What I don't understand is how to iterate true the lines/records in a file.
If I run the following script I'll get a file with x records in it that
I then want to stuff in the database...
# iptables -L traffic_in -vn | awk '{if (int($1)!=0) print $8"\t"$2}'
>> /tmp/traffic.in
Example 10-3. Fileinfo: operating on a file list contained in a variable
... goes part way to explaining it.
I would also like to understand if there's a way to do what I want to do
without having to write to a temp file first.
Am I making sense here?
Cheers Don
--
Don Gould
www.thinkdesignprint.co.nz - www.tcn.bowenvale.co.nz -
www.bowenvale.co.nz - www.hearingbooks.co.nz - www.buxtonsquare.co.nz -
SkypeMe: ThinkDesignPrint - Good ideas: www.solarking.co.nz