#!/bin/sh
F="192.168.0.100.ftp"
echo "open 192.168.0.100 21" > $F
echo "user username passwd" >> $F
echo "bin" >> $F
echo "get $1" >> $F
echo "bye" >> $F
ftp -i -in < $F
rm -rf $F
#!/bin/sh
FILE=$1
ftp -i -in <<!
open 192.168.0.100 21
user username password
cd /
mput $FILE
bye
文章评论(0条评论)
登录后参与讨论