Bug 8573 - Gawk/awk printf format error in RH 6.1
Summary: Gawk/awk printf format error in RH 6.1
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gawk
Version: 6.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-01-18 16:36 UTC by dickson
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-05-18 14:00:10 UTC
Embargoed:


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

Description dickson 2000-01-18 16:36:47 UTC
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 16:41:59 UTC
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.