|
Here is a script that I use sometimes. You can comment/remove some of the options such as the log or debug...
cat goftp2
#!/bin/sh
#set -v
echo NOTE: check ftplog for connection info
DATE=`date`
echo Current time is $DATE
rm ftplog
date >>ftplog
HOST='192.168.0.01 5021'
USER='user01'
PASSWD='user01'
#FILE='/home/user01/file.txt'
ftp -v -n $HOST >>/home/user01/ftplog 2>&1 <<EOJ
quote USER $USER
quote PASS $PASSWD
debug
pwd
passive
mput aaa*
ls
close
bye
DATE=`date`
echo Current time is $DATE
EOJ
exit 0
|