perl -e 'while ( <> ) { $hh{$_}++; } for ( sort keys %hh ) { print $_ if $hh{$_} == 1; }' aa.txt bb.txt