Bug 8573

Summary: Gawk/awk printf format error in RH 6.1
Product: [Retired] Red Hat Linux Reporter: dickson
Component: gawkAssignee: Cristian Gafton <gafton>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-05-18 14:00:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
awk/gawk printf format error none

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