Sunday, October 31, 2010

Using FTP Get in Shell Script in Solaris

Just sharing a small but useful shell script which gets a file from remote server.

#!/bin/sh
HOST=''
USER=''
PASSWD=''
FILE=''
ftp -n $HOST <
quote USER $USER
quote PASS $PASSWD
bin
get $FILE
quit
END_SCRIPT
exit 0

No comments: