Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AWK To Read Line by line then run script

Status
Not open for further replies.

beaster

Technical User
Aug 20, 2001
225
US
I have a file called rehome_input. The file contains lines which look like:

5,10,2,10
2,12,10,115

I need to read the first line, grab the first number and pass it to a file called beaster1, but it will have to add the number to the file anywhere it finds the word TG_NUM in the beaster1 file.

After it is complete with the first line, it will need to move to the second line and do the same, naming the second pass beaster2, and so on until there are no more lines left.


I am thinking this should be an AWK and SED thing, but is quite over my head at this time.

Thanks as always,
Beaster
 
Please disregard this post, I was more specific in my latter post request, thanks, beaster
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top