Thursday, May 13, 2010

Grep command to compare two files

$ cat > a
aap
noot
mies
teun

$ cat > b
noot
vuur
kees
mies

$ grep -v -f b a
aap
teun

$ grep -v -f a b
vuur
kees

Source: http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1113632

No comments:

Post a Comment