I would like to see if there is a title url in the following gzip file:
title
curl -O http://www.imdb.com/sitemap_US_02002.xml.gz grep 'imdb.com/title/tt' sitemap_US_02002.xml.gz
Is there a way to do this 'on the fly', perhaps even in a one-liner?
If you mean you just want to do this in a pipelined fashion, this should work:
curl http://www.imdb.com/sitemap_US_02002.xml.gz | zcat | grep 'imdb.com/title/tt'
Many systems (Linux and OS X at least) come with a zgrep utility that will gzip-decompress its input and then run the result through grep. Like so:
zgrep
grep
curl http://www.imdb.com/sitemap_US_02002.xml.gz | zgrep 'imdb.com/title/tt'
If you mean you just want to do this in a pipelined fashion, this should work: