Hi all,
I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to look inside two tar files are once.
The tar file is structured as follows:
List_of_tests.tar -> These_are_the_tests folder -> several tar.gz files -> a series of folders which I want to search
So far for code I have:
PATH=`tar tf List_of_tests.tar | grep generaltest | xargs tar tf | grep test42`
The first two commands (tar tf and grep) work correctly however I am unable to get the third command to run correctly. It tells me the directory does not exist and I believe this is because tar tf only lists what is inside that directory and therefore after executing the file the first time I lose List_of_tests.tar from the path and the path simply starts with These_are_the_tests/....
Any ideas?
Thanks!
Bashnewbee