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!

grouping and grep only different lines

Status
Not open for further replies.

babeo

Technical User
Mar 30, 2000
398
CA
Hi,
I have a file contain repeating data, eg
[3311111450]
[3311111450]
[40222221100]
[40222221100]
[40222221100]
[66666221100]
[66666221100] and so on..

I want to cat the file but only display 1 line for each group
[3311111450]
[40222221100]
[66666221100] and so on.

Is there any command can do the grouping by line?
Thanks
 
Woah Hooo!!

It works perfect. Thanks a lot Sam.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top