Tragically L33T

Stupid BASH tricks...

Posted on 22 Mar 2009 in bash

From my coworker, Hiram…

#
# search file1 for lines not present in file2
#
cat file1 | while read i ; do if ! grep -q $i file2 ; then echo $i ; fi ; done

Got any BASH one liners to share?

Recent Comments

Fork me on GitHub