Hello again!
I have a file filename.tar.gz. I would like to see a list of the files in the tarball as well as the number of lines in each file.
I know wc -l will give me the number of lines in a file.
I know that tar -t will give me a list of the files in a tarball.
I know that gzcat will show me the contents of a compressed file without uncompressing it.
My first attempt was
Code:
gzcat filename.tar.gz | tar -t | wc -l
but that isn't right....
What I'm having problems with is putting these commands together to produce the desired result. Are these even the best commands to use? Is there a better (easier) way?
Any help would be appreciated.
Thanks,
Brian