4

sed question.

view full story
linux-howto

http://www.linuxforums.org – Hello All, This is not an Ubuntu question, more like a command question but since I use Ubuntu I just jumped into this section. I am trying to sort a text file and remove all the duplicates. Every single line within this file looks like this: zone "URLHERE"{ type master; file "named.bhd"; }; # malware/malwaredomains/malwaredomains 2009-12-02 what I want to make sure that that the section that says "URLHERE" is unique for every occurrence. Everything else within this command line is unique other than the date. I tried using :sort -u in VI but this didn't remove all the duplicates since some were added in different days. I am pretty sure this can be done with sed, but I'm just not that familiar with it. If anyone can help me out I'd truly appreciate it, and thanks in advance! (HowTos)