: !/bin/sh awk '{ for ( i=1; i <= length($0); ++i ) { c = substr($0,i,1) if ( c == "\"" ) inquote = (inquote == 1) ? 0 : 1 if ( c == "\," && inquote == 1 ) c = ";" printf("%s",c) } printf("\n") }'