Hi i have to transfer files whose names consists of two variables X, Y and they are in the directory ABC in ftp server to my local unix directory XYZ. after transfering files i have to go to local directory path and i should untar (input files are compressed files) them.
one more thing i have to use username and pwd for connecting to ftp. and copying files to local server also i have to use my username and pwd.
everything should done automatically with unix script.
Help me...plz
ftp -n hostname <<EOF
user username pwd
cd ABC
get ls *X*.tar | ls *Y*.tar username1@pwd1 : XYZ
EOF
bye
for next in `ls *.tar`
do
tar -zvxf $next
done
will it work?
thanks in advance