[qwp@localhost qwp]$ cat update.sh
#!/bin/bash
bak=`date +"%Y%m%d"`
PATH=~/ftp
for i in "$@"
do
if [ -s $PATH/$i ];then
echo "[ $i ] is aready exeit;copy this file;"
/bin/mv $PATH/$i $PATH/$i.$bak
/bin/ls -ltr $i.$bak
else
echo "[ $i ] is not exeit;don't copy;"
fi
done
ftp -i -n <<EOF
open 192.168.152.2
user qwp qwp
echo "ok"
by
EOF
[qwp@localhost qwp]$ ./update.sh uninst.exe
[ uninst.exe ] is not exeit;don't copy;
./update.sh: line 15: ftp: command not found
[qwp@localhost qwp]$
为何此处说 没有ftp命令撒