The -h option is not working in xzgrep/zgrep
Issue
- The option
-h
does not work withxzgrep
andzgrep
- It shall suppress the filenames as it does with
grep
. - According to man page, the output of
xzgrep
with-h
option shall be as without filename prefix.
-h, --no-filename suppress the file name prefix on output
--label=LABEL use LABEL as the standard input file name prefix
- zgrep -h does not work in Red Hat Enterprise Linux 6
[root@host root]# zgrep -h foo f1 f2
f1:foo
f2:foo
Environment
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
- xzgrep [Packaged via xz. Problem is seen with both RHEL 5 and RHEL 6]
- zgrep [problem is only noticed with RHEL 6. Packaged via gzip 1.3.12-18.el6 ]
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.