On Sun, Jul 26, 2015 at 3:00 AM, Gavin Smith <[email protected]> wrote:
> ... > > Alternatively, you can use grep (the low-tech solution): > > for f in /usr/share/info/*info*gz ; do echo ============ $f > ============ ; gzip -cd $f | grep foo ; done > This is very helpful and I'm using it frequently. However, it prints out every /path/filename even if my search term is not found therein. Is there a way to modify this script to only print output if the 'foo' is found?
