[Bug 248813] bzgrep ignores --no-filename flag
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Aug 21 17:24:18 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248813
Bug ID: 248813
Summary: bzgrep ignores --no-filename flag
Product: Base System
Version: 12.1-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: bugs at FreeBSD.org
Reporter: moviuro+freebsd at gmail.com
Steps:
echo '1.1.1.1' > file1; echo '1.1.1.0' > file2
bzip2 -k file1 ; bzip2 -k file2
bzgrep --no-filename 1.1.1 file*bz2
Expected: flag is honored
1.1.1.1
1.1.1.0
Actual: flag is ignored
file1.bz2:1.1.1.1
file2.bz2:1.1.1.0
Patch below:
--- /usr/bin/bzgrep.orig 2020-08-21 19:10:56.072359000 +0200
+++ /usr/bin/bzgrep 2020-08-21 19:08:19.219508000 +0200
@@ -114,6 +114,9 @@
exec ${grep} -V
;;
-*)
+ case $1 in
+ --no-filename) silent=1 ;;
+ esac
grep_args="${grep_args} $1"
shift
;;
FWIW; the bzgrep from https://sourceware.org/bzip2/ also has troubles with that
specific --no-filename flag.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list