The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 07-05-2007
skyineyes skyineyes is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 150
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
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:29 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0