The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 11-17-2008
sriharsha_kvr sriharsha_kvr is offline
Registered User
  
 

Join Date: Nov 2008
Location: Bangalore
Posts: 11
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."