Skip to content

Instantly share code, notes, and snippets.

Created Mar 11, 2020
What would you like to do?
awk examples
# 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