Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
awk and looping
Name: Coop Date: October 18, 2005 at 10:12:47 Pacific OS: Xp Pro CPU/Ram: Pentium M/ 512 MB
Comment:
I have 3 files which I must awk seperately and I know I need a for loop but I'm not sure how to start it. Any ideas? Thanks!
Name: Jim Boothe Date: October 18, 2005 at 10:35:32 Pacific
Reply:
You do not need a loop to process the records in a file (or files). However, you might want control-break logic to do something when your input file changes. The following code shows a single awk print statement that is processing three files:
Summary: Done in KSH, but it worked fine for me. The $startnumber and $readwidth variable basically control the whole thing, you can play with them to get different results, but ideally they should be the same...
Summary: awk does the getlines (into $0 buffer) for you automatically. A basic awk solution will not use an explicit getline, but getline comes in very handy in many cases. So we let awk read the lines. We s...
Summary: Hi, I have a ksh which uses seperated awk programs inside. Can i define a variable in the ksh and then using awk to refer to it? eg under ksh i have abc=count+120 so in the awk part which is written ...