cat 100GB_data_file_with_DUPLICATE_lines | parallel --pipe awk \'\!a[\$0]++\' > data_file_with_UNIQUE_lines
is BETTER since it uses less computer resources than
gawk '!a[$0]++' 100GB_data_file_with_DUPLICATE_lines > data_file_with_UNIQUE_lines
is BETTER since it uses less computer resources than
gawk '!a[$0]++' 100GB_data_file_with_DUPLICATE_lines > data_file_with_UNIQUE_lines
If you're looking to spread work across CPUs and correctly get the desired output, I'd do something like:
parallel -a input.txt --pipepart mawk \'\!a[\$0]++\' | mawk '!a[$0]++' > output.txt
I used mawk because it is typically much more performant on large files.Just use '<'.