The Easiest Way to Save and Share Code Snippets on the web

getftp.sh

bash | by: ikernaix

posted: Aug, 19th 2010 | jump to bottom

#!/bin/sh
 
HOST='172.18.9.168'
USER='user'
PASSWD='pass'
FILE='file.txt'
 
ftp -n  $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
get $FILE
quit
END_SCRIPT
 
exit 0
42 views