Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

eliminating duplicate fields with corresponding records. 1

Status
Not open for further replies.

billbose

Programmer
Jan 15, 2001
66
US
Hi experts,

I have a file containing duplicate fields(not records) like say, as follows:

1122 Mary
1122 Joe
1335 Reise
1324 John

After elminating the duplicate fields with the corresponding records, I should get a output like follows:

1122 Mary
1335 Reise
1324 John

Would somebody help me with a script?
TIA

Regards,
Bill
 
Thank you folks. However i sorted out the answer to the above problem. It is

awk '$1 != prev { print ; prev = $1}' < exatext3

Regards,

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top