#!/bin/sh
export PATH=$PATH:/opt/oracle/product/10.2.0/bin:.
export ORACLE_HOME=/opt/oracle/product/10.2.0
export ORACLE_SID=myoracle
export ORACLE_OWNER=oracle
export ORACLE_BASE=/opt/oracle
export ORACLE_TERM=vt100
cd /home/oracle/duizhang
sqlplus -S test/test@myoracle @/home/oracle/duizhang/riqi.sql //获取系统日期
riqi=`cat riqi.lst`
echo "$riqi"
filename=`echo "U.450."$riqi`
for readbuf in `cat ftp.txt` //ftp.txt文件每行记录了 用户名 密码 地区
do
USER=`echo $readbuf|awk '{print $1}'`
PASSWD=`echo $readbuf|awk '{print $2}'`
AREA=`echo $readbuf|awk '{print $3}'`
ftp -i -in <open 192.168.11.21
user $USER $PASSWD
passive off
bin
lcd $AREA
cd UP
put $filename
by
EOF
a=`date +$AREA+'%Y-%m-%d'`
echo $a $? "done!" >> ftp.log
done
阅读(1495) | 评论(0) | 转发(0) |