Hi, thanks for the reply. I just now figured it out. Actually, it was processing the first 86 lines just fine. I'm using length($column)<16(I forgot that strings in awk aren't quite like strings in C) to make sure that these fields don't exceed 15 characters (if they do, someone else has a big...
btw, here are a couple of sample lines from the file being processed:
1~"Presentation - Browser "~3~"01525 "
2~"Presentation - Proprietary "~3~"01525 "
3~"Presentation - Wireless "~3~"01525...
Hello,
Here's a script I'm using to left-pad columns in a tilde-delimited file:
nawk -F~ 'length($1)<15{sub($1,sprintf("%015u",$1),$0)}
length($3)<15{sub(FS$3FS,sprintf("~%015u~",$3),$0);print >FILENAME}' <Name of file here>
so the file that I'm testing this on is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.