Last active
August 29, 2015 14:21
-
-
Save JohnArchieMckown/d4e051e3f48d60186370 to your computer and use it in GitHub Desktop.
AWK code to remove duplicates lines. This does not require sorting then input, but may use a lot of memory. It simply uses an "associative array" in which the index is the data line. From an tweet by Tim Chase (@Gumnos)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/awk | |
| !a[$0]++ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment