bug-gzip
[Top][All Lists]
Advanced

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

different behaviour of `grep' and `zgrep' with `-Eh' option


From: Sidorenko, Vladimir
Subject: different behaviour of `grep' and `zgrep' with `-Eh' option
Date: Wed, 15 Sep 2010 13:10:40 +0300

Hello!

 

There is obviously a bug in `zgrep', which occurs if I supply `-Eh'
option to it. Here are the steps to reproduce it:

 

>cat | tee 1 > 2

World World World !

 

>cat | gzip | tee 1.gz > 2.gz

World World World !

 

>grep -Eh World 1 2

World World World !

World World World !

 

>zgrep -Eh World 1.gz 2.gz

1.gz:World World World !

2.gz:World World World !

 

>zgrep -E -h World 1.gz 2.gz

World World World !

World World World !

 

With `-h' option I intend to have no filenames in the matched strings,
but if the options -E and -h are joined together the `-h' option is
apparently ignored by `zgrep'. The example above is simplified to the
possible minimum to reproduce the bug. In my real example I really need
-E option. Also this behavior does not take place if I search in only
one file for occurrence of `World'.

 

Here is my system information to help you to reproduce the bug:

>uname -a

Linux xxx 2.6.30-bpo.2-amd64 #1 SMP Fri Dec 11 22:52:26 UTC 2009 x86_64
GNU/Linux

 

Best regards

Vladimir Sidorenko



reply via email to

[Prev in Thread] Current Thread [Next in Thread]