February 10, 2007

Automating the FTP Process in Linux

#!/bin/sh
# Automating the FTP Process

clear
echo "Executing FTP Transfer"
echo "Please Enter Hostname"
read Host
echo "Please Enter Username"
read USER
echo "Please Enter Password"
read PASSWD
echo "Please Enter the Path"
read Path
echo "Please Enter the name of the File"
read Name

ftp -n $Host << SCRIPT
quote USER $USER
quote PASS $PASSWD
bi
cd $Path
get $Name
bye
SCRIPT
exit 0

No comments: