|
Try below script. Assign the appropriate values to the variables. mget fetches the multiple files with the specified condition.
#!/usr/bin/ksh
HOST='Your_Host_To_Connect'
USER='USER_ID'
PASSWD='PASSWORD'
DIRPATH=/home/manish/Files
echo "Fetching the requested data. Please wait..."
ftp -i -n $HOST <<EOF
user ${USER} ${PASSWD}
mget abc*
quit
EOF
echo "Done."
|