i have a script that will perform the following steps:
1) FTP to dir a1.Then get the ls -ltr and redirect to file a1.txt
2) FTP to dir b1.Then get the ls -ltr and redirect to file b1.txt
3) FTP to dir c1.Then get the ls -ltr and redirect to file c1.txt
What i want is how shall i achieve the logic for redirecting the o/p of each directory into a separate file
script :
for i in a1 b1 c1
do
ftp -v -n ftp.retail.com <<EOF
user ask peter
prompt
cd $i
ls -ltr
bye
EOF
done