标签:shell ftp
#!/bin/bash
if [ $# -ne 2 ]
then
echo "Usage:bash $0 <remotedir> <filename>"
exit 1
fi
IP=192.168.10.123
REMOTEDIR=$1
FILENAME=$2
#local_filename=`basename $FULLNAME`
#DESTFILE=$DESTDIR/$local_filename
ftp -i -n <<FTPIT
open $IP
user username passwd
bin
passive
cd $REMOTEDIR
get $FILENAME
quit
FTPIT
exit 0
标签:shell ftp
原文地址:http://bazhen.blog.51cto.com/2039382/1650966