awk - Remove line if field is duplicate
- by Kyle
Looking for an awk (or sed) one-liner to remove lines from the output if the first field matches.
An example for removing duplicate lines I've seen is:
awk 'a !~ $0; {a=$0}'
Tried using it for a basis with no luck (I thought changing the $0's to $1's would do the trick, but didn't seem to work).