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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-23-2007
Registered User
 

Join Date: Jun 2007
Posts: 57
print a line containing word in a column using grep

hi,

how to print a row which contains a perticular word in its third column using grep, cut,
or any thing else.


thanks
Sponsored Links
  #2 (permalink)  
Old 11-23-2007
manas_ranjan's Avatar
Registered User
 

Join Date: Jul 2007
Location: Amsterdam
Posts: 177
please post it with samples....
  #3 (permalink)  
Old 11-23-2007
Registered User
 

Join Date: Nov 2007
Posts: 22
awk '{if ($3 == "pattern") print $0}' your-file.txt

If the delimiter is something else like ":",

awk -F ':' '{if ($3 == "pattern") print $0}' your-file.txt
Sponsored Links
Closed Thread

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 Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
print line before column 1 transitions ajp7701 Shell Programming and Scripting 2 04-18-2008 12:05 AM
grep a word from a specific line blurboy Shell Programming and Scripting 3 01-23-2008 04:13 AM
grep a word and display its column Orbix UNIX for Dummies Questions & Answers 1 12-24-2007 08:32 PM
grep a word from a line Orbix UNIX for Dummies Questions & Answers 2 12-23-2007 11:52 AM
Print the line containing the maximum value in a column kingkong UNIX for Advanced & Expert Users 22 02-03-2006 10:38 AM



All times are GMT -4. The time now is 02:24 PM.


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-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0