Search This Blog

Wednesday, April 04, 2007

Comparing two list of files

I had to compare list of files, which was stored in two files. I wrote a small shell script.
for i in `cat ~buildman/WhiteList`
do
        grep $i ~buildman/BlackList
done
But beware it is taking each line of WhiteList as a substring. So if you have aaa in WhiteList that aaaaa from BlackList will be printed out.
Post a Comment