Chinaunix首页 | 论坛 | 博客
  • 博客访问: 242154
  • 博文数量: 55
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 261
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-19 01:34
文章分类

全部博文(55)

文章存档

2013年(37)

2009年(6)

2008年(12)

我的朋友

分类:

2008-09-20 17:18:39

#!/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\             
阅读(5774) | 评论(4) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-09-10 22:43:03

tjfyphhqx2008-12-14 00:01:42

学无止境

tjfyphhqx2008-12-13 23:56:17

我已成功注册

tjfyphhqx2008-12-13 23:51:00

eee