Subject: bug#33302: Unexpected unzip

From: [email-masked]
Date: Wed, 07 Nov 2018 08:33:33 +0000

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