GNU bug report logs - #33302
Unexpected unzip

Previous Next

Package: gzip;

Reported by: d.s.robertson <at> protonmail.ch

Date: Wed, 7 Nov 2018 15:23:02 UTC

Severity: normal

Tags: notabug

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33302 in the body.
You can then email your comments to 33302 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gzip <at> gnu.org:
bug#33302; Package gzip. (Wed, 07 Nov 2018 15:23:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to d.s.robertson <at> protonmail.ch:
New bug report received and forwarded. Copy sent to bug-gzip <at> gnu.org. (Wed, 07 Nov 2018 15:23:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: d.s.robertson <at> protonmail.ch
To: bug-gzip <bug-gzip <at> gnu.org>
Subject: Unexpected unzip
Date: Wed, 07 Nov 2018 08:33:33 +0000
[Message part 1 (text/plain, inline)]
I am using raspbian stretch, terminal window. superuser activated.
In directory /var/log/apt the history.log.1.zg file is marked as gz format.
I want to look for lines with the word install in them.
I didn't necessarily want to uncompress the file. I executed the command
gunzip history.log.1.gz | grep install
My expectation was that the un zipped contents would be piped to grep which would filter for lines containing the word install.
It changed the file to a decompressed version. I don't think it changed the contents. There was no terminal output.
I gather I have to use -c
I just wonder if a pipe might automatically be interpreted as providing the contents and leaving the original unchanged?

David

Sent from ProtonMail mobile
[Message part 2 (text/html, inline)]

Information forwarded to bug-gzip <at> gnu.org:
bug#33302; Package gzip. (Wed, 07 Nov 2018 15:43:01 GMT) Full text and rfc822 format available.

Message #8 received at 33302 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: d.s.robertson <at> protonmail.ch, 33302 <at> debbugs.gnu.org
Subject: Re: bug#33302: Unexpected unzip
Date: Wed, 7 Nov 2018 07:42:02 -0800
d.s.robertson <at> protonmail.ch wrote:
> I just wonder if a pipe might automatically be interpreted as providing the contents and leaving the original unchanged?

That would run afoul of the Unix tradition that programs shouldn't care about 
where stdout is going. This is part of the GNU Coding Standards so it's unlikely 
to change here.




Added tag(s) notabug. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Wed, 30 Mar 2022 00:24:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 33302 <at> debbugs.gnu.org and d.s.robertson <at> protonmail.ch Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Wed, 30 Mar 2022 00:24:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 27 Apr 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 364 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.