Skip to content

Instantly share code, notes, and snippets.

@tenomoto
Created November 16, 2016 05:13
Show Gist options
  • Save tenomoto/c3e8a72dcdab7f15dcd5b402d8bb172b to your computer and use it in GitHub Desktop.
Save tenomoto/c3e8a72dcdab7f15dcd5b402d8bb172b to your computer and use it in GitHub Desktop.
Remove paired double quotes and commas in between
#!/usr/bin/awk -f
# http://unix.stackexchange.com/questions/48672/remove-comma-between-the-quotes-only-in-a-comma-delimited-file
BEGIN {
FS = "\""
OFS = ""
}
{
for (i = 2; i <= NF; i += 2) {
gsub(",", "", $i)
}
print $0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment