Created
January 16, 2011 14:19
-
-
Save mneedham/781819 to your computer and use it in GitHub Desktop.
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
| column_1 column_2 | |
| mark random | |
| mark something_else | |
| dave | |
| Only care about column_1 uniqueness but want to print out column 2 in the result | |
| Output | |
| 1 dave | |
| 2 mark random |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
awk '{ if(!unq[$1]) print $2; unq[$1]=$1; }' file.name