[Bug 220924] bsdgrep(1) unexpectedly stops processing command line arguments

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Jul 22 13:35:51 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220924

            Bug ID: 220924
           Summary: bsdgrep(1) unexpectedly stops processing command line
                    arguments
           Product: Base System
           Version: 11.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: jocki84 at googlemail.com

When searching for an empty expression '' with bsdgrep(1), processing of files
given on the command line stops when an empty file is encountered.

$ touch a
$ echo b > b
$ bsdgrep '' a b
$ 

The output is empty, while the expected output is a line containing 'b:b'.

This does not occur when passing the file names in the opposite order:

$ bsdgrep '' b a
b:b
$ 

Note that grep(1) (GNU grep) behaves as expected.

$ grep '' a b
b:b
$ grep '' b a
b:b
$

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list