In some reason, I have to move my job from unix to environment under windows .
But I have met some troubles. It is conflicted of "%" between batch and printf of awk.
if you type
echo 100.33 | gawk "{ printf( \"%6.2f\", $1 ) }" |
it will output
.2f |
you should repeat them twice like this
echo 100.33 | gawk "{ printf( \"%%6.2f\", $1 ) }" |
and it will be what you want
100.33 |
reference
How can I use the percent symbol (%) in a batch file?
DOS Command Index