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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using sort or uniq

Status
Not open for further replies.

zqadora

Programmer
Nov 13, 2002
10
US
Hello,

I have file in which each line contains 8 fields. I need to get unique lines only if it unique in the last 3 fields. What is the command needed using uniq or sort.

Regards
ZQ
 
One more note, the field are seperated by commas.
 
Try this...
Code:
sort -u -t , -k 6,8 oldfile.dat > newfile.dat
See the [tt]man[/tt] page for explanation and more info.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top