Kind of my extended memory with thoughts mostly on Linux and related technologies. You might also find some other stuff, a bit of SF, astronomy as well as old (quantum) chemistry posts.
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.
1 comment:
Anonymous
said...
grep with -x option should fix the aaa vs. aaaaa problem.
1 comment:
grep with -x option should fix the aaa vs. aaaaa problem.
Post a Comment