![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help on looping using if/for or while | sam4now | Shell Programming and Scripting | 1 | 04-24-2008 02:33 PM |
| for looping | ccp | Shell Programming and Scripting | 2 | 04-17-2008 12:05 AM |
| Looping and using Sed | digobh | Shell Programming and Scripting | 4 | 02-04-2008 08:25 PM |
| URGENT,URGENT- Need help tape drive installation | sriny | UNIX for Advanced & Expert Users | 3 | 11-16-2006 03:43 PM |
| Looping in awk | keelba | UNIX for Advanced & Expert Users | 3 | 05-31-2002 05:04 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Urgent - Looping using AWK
Hi
I have a file which is having following text. The file is in a tabular form with 5 fields. i.e field1, field2 ..... field5 are its columns and there are many rows in it say COUNT is the number of rows Field 1 Field2 Field3 Field4 Field5 ------- ------- ------ ------ ------ abs sddd wee dffsd ffsdf wqe dqdd wdqd dwqd weqwq wqew wede wedw ddwe ewdfw ewew weew rrfff edff ferf I want to use the above file in my shell script. Using AWK i want to loop through all the lines of the above file in the shell script. In each iteration of the loop i want the field 1,field 3 and field 5 values in my own variables VAR1, VAR2, VAR3 defined in the shell script. Kindly provide me with the necessary code. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|