2 files diff help
by 2byt3s from LinuxQuestions.org on (#52FB1)
I need some help with a bash script to do the following. I can do simple stuff in bash but this one is beyond me.
I have 2 files, one has a set of domains and urls only such as
www.google.com
www.fakeurl.com/xmltcs/test.php
the other contains another list some of the urls match but are not in the same order and are commented using the # to notate not to be processed:
www.google.com # comment not to be processed
www.wikihow.com/index.html # whatever goes here
I need to parse the two and merge them, removing any duplicates but keeping the comments if there are any.
Any ideas?


I have 2 files, one has a set of domains and urls only such as
www.google.com
www.fakeurl.com/xmltcs/test.php
the other contains another list some of the urls match but are not in the same order and are commented using the # to notate not to be processed:
www.google.com # comment not to be processed
www.wikihow.com/index.html # whatever goes here
I need to parse the two and merge them, removing any duplicates but keeping the comments if there are any.
Any ideas?