#!/bin/sh
#date=20080916
#echo $date
ftp -i -n 192.168.1.161 <user name password
cd bj
ls *20080916* 20080916
bye
EOF
aaaa=`ls *20080916* |wc -l`
echo $aaaa
bbbb=`cat 20080916|wc -l`
echo $bbbb
if [ $aaaa -eq $bbbb ]
then
echo "ftp transfered completely "
else
echo "ftp transfered error"
fi
#!/bin/sh
ftp -i -n 192.168.1.152 <user name password
ls -lt file1
bye
EOF
ls -lt >file2
awk '{print $5}'file2 | while read tty
do\
awk 'BEGIN {...}END{name="'tty'";\
if($5==$name)\
printf("%s",zhengque);\
else\
printf("%s transfer error\n",$9);\
printf("the size of source file is %d,the size of this file after ftp\
transferred is %d",$name,$5);\
}\
' file1\
done\
阅读(5848) | 评论(4) | 转发(0) |