#!/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
阅读(332) | 评论(0) | 转发(0) |