Friday, December 5, 2008

Script to transfer a file from one UNIX box to another

HOST = '192.168.100.2'
USER = 'username'
PASSWD = 'password'
FILE = 'myfile.log'

ftp -n $HOST << END_SCRIPT
quote USER $USER
quote PASS $PASSWD
get $FILE
quit
END_SCRIPT
exit 0

No comments: