Friday, May 21, 2010

sort & uniq command

sort command is used to sort a file in alphabetical or numberical order.



uniq command is used to extract unique lines from a file.


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