Bug 1294867 - gawk -h exits with ecode of 1 and raises "gawk: option requires an argument -- h" warning while --help works as expected
gawk -h exits with ecode of 1 and raises "gawk: option requires an argument -...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: gawk (Show other bugs)
22
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: David Kaspar [Dee'Kej]
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-30 14:06 EST by frantisek.reznicek
Modified: 2016-05-31 12:24 EDT (History)
2 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description frantisek.reznicek 2015-12-30 14:06:09 EST
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 12:24:08 EDT
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.