The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > UNIX and Linux Applications > Oracle Updates (RSS)
Google UNIX.COM


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
bc and wc utilities??? skyineyes UNIX for Dummies Questions & Answers 6 05-29-2008 09:46 AM
Awk Utilities jyo123.jyothi Shell Programming and Scripting 10 05-08-2008 02:45 AM
version of the utilities abey HP-UX 3 02-10-2006 02:39 AM
compression utilities jalburger UNIX for Dummies Questions & Answers 6 07-08-2004 08:06 AM
Zmodem Utilities SmartJuniorUnix UNIX for Dummies Questions & Answers 1 06-12-2001 07:13 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-08-2008
Registered User
 

Join Date: Apr 2008
Posts: 11
Stumble this Post!
Question Awk Utilities

Hi,
My input file is like this

1 11110001 1.1.1.1.1
2 12222212 2.3.44.5.6
3 22223333 1.3.2.4.1.55

Now i need the 2nd column value get printed
I tried with the following command

awk 'NR==1 {print $2}' input
this works fine for only 1st row.I need to change always NR assigned value to get printed all the 2nd column values so i tried like this but i m not getting

for( i=1;i<=3;i++)
do
Index=`awk 'NR==$i print $2}' input`
echo $Index

But i am not getting any value printed
Please anyone help me in this ...
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:27 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0