in reply to removing non-duplicates
1) preserving the existing order:
2) sortedperl -e 'while(<>){ $_{$_} or print $_; $_{$_}=1;}' <file
Note: I deem it to be safe enough to use %_ for quick perl -e usages (without any modules) and not for normal programming where the hash %_ should be replaced by a properly named and declared one.perl -e 'while(<>){ $_{$_}=1;} print sort keys %_;' <file
One world, one people
|
|---|