By default, bzcat
(or, equivalently, bzip2 -dc
or bunzip2 -c
) will keep the source (compressed file) and not delete it. Is there a flag or other means (besides thereafter manually rm
ing the file) to delete the compressed file when using bzcat
or one of its equivalent commands?
(The reason I want to do this — in case you're wondering — is that I wish to sed
-modify the output for immediate use after tee
ing the unmodified output to a file. I can of course instead bzcat | sed ; bunzip2
, but that requires two decompressions. Any other solution for my actual problem is certainly welcome in lieu of an answer to the question I pose above.)