android bsd linux unix & open-source world


Tip of the day: 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:

gawk '!x[$0]++' filename
Print This Post Print This Post