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 -->
  #6 (permalink)  
Old 03-20-2002
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline
Registered User
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
for loop

Peter,
Sounds like a perfect job for a "for loop" or for something like this.

Something like this. If you have multiple sed commands you can only have one here and use some criteria as below to make the loop continue until all of your data is changed.


for name in `cat original.file`
do
Paste your stuff here.

done 2> /save/to/error/log



Sounds like you have a starting file that you pull a field out of to create a new file. Then you take that column of data and create a new file and then perform the algorithm and then paste both columns into another file with only the 2 columns in it.

Is that correct? Can you post what you have? It is hard to answer without seeing your script.


__________________
My brain is your brain