This shows you the differences between the selected revision and the current version of the page.
| awk 2009/12/07 09:50 | awk 2009/12/07 09:52 current | ||
|---|---|---|---|
| Line 86: | Line 86: | ||
| awk 'BEGIN {FS = ","; OFS = ","} {for( i = 2; i < NF; i++) $1 = $1 "%C2" $i; print $1, $NF }' | awk 'BEGIN {FS = ","; OFS = ","} {for( i = 2; i < NF; i++) $1 = $1 "%C2" $i; print $1, $NF }' | ||
| + | The initial value of i could be varied to leave fields at the beginning of the line unmerged, which would require that the concatenation (//$1 = $1 "%C2" $i;//) and the print statement be changed. | ||