|
|
|
|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | 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. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
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 |
|
|
|
|||
|
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 | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
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 |