The -h option is not working in xzgrep/zgrep
Issue
- The option
-hdoes not work withxzgrepandzgrep - It shall suppress the filenames as it does with
grep. - According to man page, the output of
xzgrepwith-hoption 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 of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
