There're many questions of stripping leading/trailing spaces. My problem is the opposite. I would like to retain any spaces in the field! awk command seems to strip off all except for 1 space.
e.g. input == '20AA12 ZZ','20BB1 ZZ'
FS == ',' (comma)
Item == fix length of 10 char with embedded spaces.
printf ("'%s'\n",$1) and printf ("'%s'\n",$2) will result in '20AA12 ZZ' and '20BB1 ZZ'
i.e the item ended up with 9 and 8 chars respectively!
How to I preserve the extra spaces in the the items?
Thanks.
e.g. input == '20AA12 ZZ','20BB1 ZZ'
FS == ',' (comma)
Item == fix length of 10 char with embedded spaces.
printf ("'%s'\n",$1) and printf ("'%s'\n",$2) will result in '20AA12 ZZ' and '20BB1 ZZ'
i.e the item ended up with 9 and 8 chars respectively!
How to I preserve the extra spaces in the the items?
Thanks.