gzcat does 2 things : gunzip on the fly, and cat of content, all that to STD OUT.
This allows you to
gzcat my_tar_archive.tgz | tar -tvf -
If you are to not use gzcat ( could be you havent got it installed...), as the previous post suggest, you are to use gunzip and uncompress, read content and create the .gz file again
Since gzip, gunzip and gzcat are the same executable, so if you have one, you have all, available all over as a binary or source. Normally, you do something like this:
gunzip < file.gz | while read ln
do
. . .
done
Compatability: uncompress will not work on .gz, but gunzip, gzcat work on compress output (.Z).
Thanks Guys For ur Replies..
the problem i had was gzcat was not installed in my system and was not able to figure out the solution for a line by line processing . your posts solved my problem :)