# delcoma.awk - deletes comma from fiels in csv-file
# delcoma.awk - croatian: brise zarez iz polja csv-datoteke
# Kruno Peter, kruno_peter@yahoo.com
# true awk, Public Domain, August 2001
# Jesus loves you.
{
split($0,ch,"")
for (i = 1; i <= length; i ++) {
if (ch[i] == "\"" && swOpen) { # close
swOpen = 0
newRow = newRow ch[i]
continue
}
if (ch[i] == "\"" && !swOpen) { # open
swOpen = 1
newRow = newRow ch[i]
continue
}
print swOpen, ch[i]
if (swOpen && ch[i] == ",") continue
newRow = newRow ch[i]
}
print newRow
}