If I am not wrong, what you want is:
1.) Download a tar file from an ftp site.
2.) Untar them
3.) Tar them a again with gzip and save them to a particular location.
Though I am new to Linux but will still try. Please do post, if I was rigt or wrong in my approach, this will help to understand the concept better.
vim test.sh
Code:
wget http://ftp.domainname.com/filename.tar
tar -xvf filename.tar
for NAME in $(tar -tvf filename.tar)
tar -C /mydirectory -zcvf newfilename.tar $NAME
I hope this works, if it doesn't and you get the proper code, please do let me know.
Naman