You can use Perl for this:
perl -ne 'print unless $seen{$_}++' file.txt
The -n switch causes Perl to process the file line by line. Each line ( $_ ) is saved as a key in a hash named "view", but since ++ returns after the value is returned, the line is displayed for the first time it is encountered.
choroba
source share