gawk, comma delim to fixed length?
Hi,
Is there a way to program gawk such that a 60 field comma delimited file is converted to a fixed length file? I'd like to set the length of each field. I tried first editing the file using vi, and changing all commas to tabs, but the variety of data within fields resulted in a "abnormal" (not normalized) file. If gawk is the wrong utility for the job, I'd like to know that too. Thank you. |
gawk should do just fine ... you can parse the fields by
setting the FS appropriately and then output using printf with padding .... voila. Cheers, Tink |
All times are GMT -5. The time now is 04:35 AM. |