Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1676652
  • 博文数量: 1493
  • 博客积分: 38
  • 博客等级: 民兵
  • 技术积分: 5834
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-19 17:28
文章分类

全部博文(1493)

文章存档

2016年(11)

2015年(38)

2014年(137)

2013年(253)

2012年(1054)

2011年(1)

分类:

2012-07-25 10:39:12

原文地址:批量ftp上传 作者:lotus302

#!/bin/bash


IP=10.10.18.8
USER=mcpp30
PASSWD=umcpp30


myftp(){
ftp -n $IP <
quote USER $USER
quote PASS $PASSWD
cd ./nm
bin
put $1 $2
rename $2 $1
quit
END_SCRIPT
echo "ftp" $1 $2>> ftp.log
}


file_list=`find . -name "*.CDR" -type f |sort`
for file in $file_list
do
if [ "${file##*.}" = "CDR" ]
then
tmp_file=${file/%"CDR"/"tmp"}
myftp $file $tmp_file
mv $file ../boss
fi
done
exit 0
阅读(304) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~