l33tgaijin
Programmer
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 128 lines, but after running this script, only 86 lines are in the file. I assume that I have some qualification that's preventing the last ~46 lines from being processed.... Any ideas?
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 128 lines, but after running this script, only 86 lines are in the file. I assume that I have some qualification that's preventing the last ~46 lines from being processed.... Any ideas?