% perl -ne '$h{$_}++; END { print for grep $h{$_}==1, keys %h }' foo.txt