Bug 8573 - Gawk/awk printf format error in RH 6.1
Gawk/awk printf format error in RH 6.1
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: gawk (Show other bugs)
6.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Cristian Gafton
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-01-18 11:36 EST by dickson
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-05-18 10:00:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
awk/gawk printf format error (3 bytes, text/plain)
2000-01-18 11:41 EST, dickson
no flags Details

  None (edit)
Description dickson 2000-01-18 11:36:47 EST
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|
Comment 1 dickson 2000-01-18 11:41:59 EST
Created attachment 64 [details]
awk/gawk printf format error

Note You need to log in before you can comment on or make changes to this bug.