Created
March 11, 2020 04:38
-
-
Save nanmu42/cf840bcbef5f9186f015b0c444a88e5f to your computer and use it in GitHub Desktop.
awk examples
This file contains 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
# unique line | |
awk '{!seen[$0]++};END{for(i in seen) if(seen[i]==1)print i}' file | |
# second column of a csv, with white spaces and quotes stripped | |
awk -F',' '{gsub(/[ "]/, "", $0);print $2}' some.csv > dest.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment