Friday, June 24, 2011

How to remove duplicate entries in a file without sorting

GNU awk is a programming language that is designed for processing text-based data, either in files or data streams, and was created in the 1970s at Bell Labs.

To remove duplicate entries without sorting them, enter:
view source
print?
1 gawk '!x[$0]++' filename

No comments:

Post a Comment