|
|
Question : Removing duplicate entries in a file
|
|
Hello,
I got a file as like shown below. I want to remove all the duplicate entries in it. In addition, I want to do a numeric sort based on the last 2 numeric characters of each entry. Please let me know how can i do it?
weblm12 websb02 weblm04 weblm05 promo04 weblm04 weblm06 loglm01 weblm04 weblm01 weblm12 weblm03 weblm12 weblm02 loglm01 weblm05 weblm01 weblm06 weblm04 weblm03
Thanks in advance
|
Answer : Removing duplicate entries in a file
|
|
sort -u file >newfile
|
|
|
|
|