Printf format error: $ cat awk.test awk 'BEGIN { _n=1234567 system ("rpm -qf /usr/bin/awk") system ("uname -r") printf("|%12.0f|\n",_n) printf("|%12.1f|\n",_n) }' $ ./awk.test # produces : gawk-3.0.4-1 2.2.12-20 |000001234567| | 1234567.0| Notice the "zero" filled field in %12.0f (this is wrong), but not in %12.1f Now same thing in RH 6.0: gawk-3.0.3-7 2.2.5-15 | 1234567| | 1234567.0|
Created attachment 64 [details] awk/gawk printf format error