10-01-2001
54,
0
Join Date: May 2001
Last Activity: 15 May 2007, 10:18 AM EDT
Location: Allentown, PA
Posts: 54
Thanks Given: 0
Thanked 0 Times in 0 Posts
Thanks, Optimus. This replaces the single comma with a double at the end of each record, which is exactly what I was looking for. However, a coworker tells me that we should be using awk:
awk -F, '{print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19}' file > newfile
now, this doesn't make sense to me because it is unwieldy and it prints white space between fields, instead of retaining its comma delimited structure. Even if we manipulated this to suit our needs, is there a clear advantage of using awk over cut piped to sed?