I use another tool (zgrep) to deal with compressed files:
export GREP=/usr/bin/egrep
zgrep . 'swap'
zgrep man page:
zgrep - search possibly compressed files for a regular expression
zgrep [ grep_options ] [ -e ] pattern filename...
zgrep invokes grep on compressed or gzipped files. All options specified are passed directly to grep.
If no file is specified, then the standard input is compressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep.
If the GREP environment variable is set, zgrep uses it as the grep program to be invoked.
export GREP=/usr/bin/egrep
zgrep . 'swap'
zgrep man page:
zgrep - search possibly compressed files for a regular expression
zgrep [ grep_options ] [ -e ] pattern filename...
zgrep invokes grep on compressed or gzipped files. All options specified are passed directly to grep.
If no file is specified, then the standard input is compressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep.
If the GREP environment variable is set, zgrep uses it as the grep program to be invoked.
Comment