awk, newbies

Login to Reply

Thread Tools Search this Thread
# 1  
Old 1 Week Ago

I have a simple question in awk,how can i read the 3th row and 2th column of a file, for example file name is x.
# 2  
Old 1 Week Ago

Per our forum rules, all threads must have a descriptive subject text. For example, do not post questions with subjects like "Help Me!", "Urgent!!" or "Doubt". Post subjects like "Execution Problems with Cron" or "Help with Backup Shell Script".

The reason for this is that nearly 95% of all visitors to this site come here because they are referred by a search engine. In order for future searches on your post (with answers) to work well, the subject field must be something useful and related to the problem!

In addition, current forum users who are kind enough to answer questions should be able to understand the essence of your query at first glance.

So, as a benefit and courtesy to current and future knowledge seekers, please be careful with your subject text. You might receive a forum infraction if you don't pay attention to this.

Thank you.

The UNIX and Linux Forums
# 3  
Old 1 Week Ago
awk 'NR==3 { print "Col",COL,"is",$COL }' COL=2 inputfile

Login to Reply

Thread Tools Search this Thread
Search this Thread:
Advanced Search

Similar Threads More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
awk output yields error: awk:can't open job_name (Autosys) alexcol Shell Programming and Scripting 18 02-08-2015 03:29 PM
awk programming -Passing variable to awk for loop ctrld Shell Programming and Scripting 2 08-15-2014 10:12 AM
Pass awk field to a command line executed within awk tuxer Shell Programming and Scripting 4 10-15-2013 09:04 AM
Passing awk variable argument to a script which is being called inside awk vivek d r Shell Programming and Scripting 2 02-11-2013 07:37 AM
ksh passing to awk multiple dyanamic variables awk -v highnthemnts Shell Programming and Scripting 1 09-27-2012 10:08 PM
HELP with AWK one-liner. Need to employ an If condition inside AWK to check for array variable ? shell_boy23 Shell Programming and Scripting 6 07-10-2012 06:20 AM
awk command to compare a file with set of files in a directory using 'awk' anandek Shell Programming and Scripting 10 05-30-2012 10:21 AM
Comparison and editing of files using awk.(And also a possible bug in awk for loop?) linuxkid Shell Programming and Scripting 1 07-22-2010 05:37 AM
Problem with awk awk: program limit exceeded: sprintf buffer size=1020 fate Shell Programming and Scripting 2 04-21-2010 11:37 AM
AWK help. how to compare a variable with a data array in AWK? usustarr Shell Programming and Scripting 9 04-19-2010 12:14 PM
Read content between xml tags with awk, grep, awk or what ever... Sebi0815 Shell Programming and Scripting 5 03-10-2010 06:58 PM
Awk error -- awk: 0602-562 Field $() is not correct. pukars4u Shell Programming and Scripting 1 01-22-2010 04:36 AM
awk: assign variable with -v didn't work in awk filter honglus Shell Programming and Scripting 2 11-27-2009 02:51 AM
scripting/awk help : awk sum output is not comming in regular format. Pls advise. rveri Shell Programming and Scripting 3 11-06-2009 08:47 PM
Awk problem: How to express the single quote(') by using awk print function patrick87 Shell Programming and Scripting 4 10-06-2009 08:36 AM
All times are GMT -4. The time now is 02:22 PM.

Unix & Linux Forums Content Copyright 1993-2018. All Rights Reserved.