Created
November 16, 2016 05:13
-
-
Save tenomoto/c3e8a72dcdab7f15dcd5b402d8bb172b to your computer and use it in GitHub Desktop.
Remove paired double quotes and commas in between
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
#!/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