The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
How to uniq third field in a file
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
How to uniq third field in a file
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
02-01-2008
Yogesh Sawant
Part Time Moderator and Full Time Dad
Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
try this:
Code:
awk '{ if (! third_col[$3]) print $0; third_col[$3]++; }' file
Yogesh Sawant
View Public Profile
Visit Yogesh Sawant's homepage!
Find all posts by Yogesh Sawant
Find Yogesh Sawant's past nominations received
Find Yogesh Sawant's present nominations given