Tuesday, August 18, 2009

Automatic FTP

Here is a way to automate FTP through script.

#!/bin/sh
stty -echo
read -p "FTP Password: " ftpsecret; echo
stty echo

ftp -n 201.54.111.157 <quote USER myuser
quote PASS $ftpsecret
cd the/directory
binary
hash
ls
mget *
bye
END_SCRIPT

No comments: