Hello, Could you please tell me how to remove duplicate lines from a file without using uniq command? 12-29-08 10:10 121221 server A 12-29-08 10:12 121221 server A 12-29-08 10:10 121221 server c 12-29-08 10:10 121221 server B 12-29-08 10:10 121221 server c 12-29-08 10:12 121221 server A 12-29-08 10:10 121221 server c 12-29-08 10:10 121221 server B 12-29-08 10:10 121221 server c This is an example file. Thanks in advance.
Just curious, why can't you use uniq? First thing you need to do is sort the file. That will make it much easier for you.
Hi Mosquito Thank you for posting nothing in particular.. I got an alternate way for this.. sort -u filename This is working as expected for me..