Bug 54327

Summary: zgrep outputs empty lines
Product: [Retired] Red Hat Linux Reporter: Need Real Name <a.t.hofkamp>
Component: gzipAssignee: Trond Eivind Glomsrxd <teg>
Status: CLOSED DUPLICATE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-10-04 12:17:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2001-10-04 12:17:30 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010808

Description of problem:
When searching through a number of files for lines matching a pattern
(duh), zgrep outputs empty lines when no match is found

Version-Release number of selected component (if applicable):
RPM package: gzip-1.3-12, RH7.1

How reproducible:
Always

Steps to Reproduce:
% cd /tmp
% echo "bla" > file
% echo "foo" > file2
% gzip file*
% zgrep blup file*


%
# In other words, the 2 empty lines between the prompts should not be there.
# For 2 files, this behaviour is not a disaster, for 100 files, it is,
# since found matches happily scroll off the top of the window.

Expected Results:  No output should be produced, since 'blup' is never
matched. In fact,

% gzip -d file*
% grep blup file*

does this (i.e. the prompt returns on the next line without outputting an
empty line)



Additional info:

zgrep behaved as grep (i.e. no output if no match) in R.H. 6.2

RPM package: gzip-1.3-12

Comment 1 Need Real Name 2001-10-04 12:26:48 UTC

*** This bug has been marked as a duplicate of 43319 ***