Bug 1294867 - gawk -h exits with ecode of 1 and raises "gawk: option requires an argument -- h" warning while --help works as expected
Summary: gawk -h exits with ecode of 1 and raises "gawk: option requires an argument -...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gawk
Version: 22
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: David Kaspar // Dee'Kej
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-30 19:06 UTC by frantisek.reznicek
Modified: 2016-05-31 16:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-31 16:24:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description frantisek.reznicek 2015-12-30 19:06:09 UTC
Description of problem:

gawk -h exists with ecode of 1 and raises "gawk: option requires an argument -- h" warning while --help works as expected

There are two problems:
a] gawk -h exists with ecode of 1
b] gawk -h raises "gawk: option requires an argument -- h" warning

Both problems appear on F22 gawk version gawk-4.1.1-6.fc22.x86_64
Just problem a] is appearing on RHEL6.x gawk-3.1.7-10.el6_7.3.x86_64

Note gawk trunk/master from today (GNU Awk 4.1.60, API: 1.2) does not sufer from any of those problems.

Version-Release number of selected component (if applicable):
gawk-4.1.1-6.fc22.x86_64
gawk-3.1.7-10.el6_7.3.x86_64

How reproducible:
100%

Steps to Reproduce:
1. gawk -h; echo $?
2. gawk --help; echo $?
3.

Actual results:
Help (-h) is recognized as valid operation, but fails with ecode of 1
Help (--help) is recognized as valid operation and passes.

Expected results:
Help (-h|--help) should be recognized as valid operation and pass.

Additional info:


[f_ii@localhost ~]$ rpm -q gawk
gawk-4.1.1-6.fc22.x86_64
[f_ii@localhost ~]$ gawk -h;echo $?
gawk: option requires an argument -- h
Usage: gawk [POSIX or GNU style options] -f progfile [--] file ...
Usage: gawk [POSIX or GNU style options] [--] 'program' file ...
...
Examples:
        gawk '{ sum += $1 }; END { print sum }' file
        gawk -F: '{ print $1 }' /etc/passwd
1
[f_ii@localhost ~]$ gawk --help;echo $?
Usage: gawk [POSIX or GNU style options] -f progfile [--] file ...
Usage: gawk [POSIX or GNU style options] [--] 'program' file ...
...
Examples:
        gawk '{ sum += $1 }; END { print sum }' file
        gawk -F: '{ print $1 }' /etc/passwd
0

Comment 1 David Kaspar // Dee'Kej 2016-05-31 16:24:08 UTC
Hello František,

this issue is already fixed in F23. It won't be fixed for F22, because it's almost EOL for F22.

Best regards,

Dee'Kej


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