Bug 513234

Summary: printf format "%.*s" in gawk not working
Product: [Fedora] Fedora Reporter: Kevin Chidgey <kfc>
Component: gawkAssignee: Jan Zeleny <jzeleny>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 11CC: armandsl, kasal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: gawk-3.1.7-3.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-21 22:01:22 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:

Description Kevin Chidgey 2009-07-22 16:08:41 UTC
Description of problem:
The "%.*s" format string in printf no longer works.

Version-Release number of selected component (if applicable):
gawk-3.1.6-5.fc11.i586

How reproducible:
Run example from bash command line.
The example should remove the last character from the string.

Steps to Reproduce:
# echo ab123dl|gawk '{printf("%.*s\n",length($0)-1,$0)}'
  
Actual results:
ab123dl

Expected results:
ab123d

Additional info:
works OK with gawk-3.1.5-14.el5 and previously on fc10

Comment 1 Armands Liepins 2009-12-23 19:59:22 UTC
The same with gawk-3.1.7-1.fc12.i686

$ echo 12345 | gawk '{printf "%.3s\n", $1}'
12345

should be 123

Comment 2 Armands Liepins 2010-01-01 13:20:16 UTC
The bug has been fixed.
http://lists.gnu.org/archive/html/bug-gnu-utils/2010-01/msg00000.html

Comment 3 Fedora Update System 2010-04-01 14:28:50 UTC
gawk-3.1.7-3.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/gawk-3.1.7-3.fc13

Comment 4 Fedora Update System 2010-04-01 14:31:24 UTC
gawk-3.1.7-3.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/gawk-3.1.7-3.fc12

Comment 5 Fedora Update System 2010-04-01 19:34:29 UTC
gawk-3.1.7-3.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gawk'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/gawk-3.1.7-3.fc13

Comment 6 Fedora Update System 2010-04-03 04:35:00 UTC
gawk-3.1.7-3.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gawk'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/gawk-3.1.7-3.fc12

Comment 7 Jan Zeleny 2010-04-19 07:13:40 UTC
If you want this update in stable, please test it and fill a comment and karma point in both issued updates. Thanks for understanding.

Comment 8 Fedora Update System 2010-04-20 13:32:41 UTC
gawk-3.1.7-3.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gawk'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/gawk-3.1.7-3.fc13

Comment 9 Fedora Update System 2010-04-21 22:01:17 UTC
gawk-3.1.7-3.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2010-07-05 22:08:14 UTC
gawk-3.1.7-3.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.