NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/57655: zgrep(1) returns incorrect exit status



>Number:         57655
>Category:       bin
>Synopsis:       zgrep(1) returns incorrect exit status
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 12 16:10:00 +0000 2023
>Originator:     Andreas Gustafsson
>Release:        NetBSD-current, source date 2023.10.11.19.57.25
>Organization:
  
>Environment:
System: NetBSD
Architecture: i386
Machine: i386
>Description:

When zgrep is run with a file argument and the file does not contain
the given pattern, it incorrectly returns an exit status of 0,
contrary to what the "EXIT STATUS" section of the zgrep(1) man page
says.

>How-To-Repeat:

$ >f
$ grep a f
$ echo $?
1
$ gzip f
$ zgrep a f.gz
$ echo $?
0

>Fix:



Home | Main Index | Thread Index | Old Index