#read the last 2 line of file
#new=`tail -n 2 /data/bakper30minExp.log`
#echo $abc
#read the last 2 line of file
#success=`tail -n 2 /data/bakper30minExpSuccess.log`
#echo $test
#if [ "$new" == "$success" ];then
# echo "Exp success"
# sqlplus mnshbak/mnshbak@orcl @/u/dropPer30min.sql
# imp mnshbak/mnshbak@orcl file=/data/bakper30min.dat fromuser=mnsh touser=mnshbak log=/data/bakper30minImp.log
# cp /data/bakper30min.dat /data/bakper30minSuccess.dat
#else
# echo "Exp fail"
#fi
#new=`tail -n 2 /data/bakper30minExp.log`
#echo $abc
#read the last 2 line of file
#success=`tail -n 2 /data/bakper30minExpSuccess.log`
#echo $test
#if [ "$new" == "$success" ];then
# echo "Exp success"
# sqlplus mnshbak/mnshbak@orcl @/u/dropPer30min.sql
# imp mnshbak/mnshbak@orcl file=/data/bakper30min.dat fromuser=mnsh touser=mnshbak log=/data/bakper30minImp.log
# cp /data/bakper30min.dat /data/bakper30minSuccess.dat
#else
# echo "Exp fail"
#fi
本文详细阐述了如何从特定目录下读取最后两行的日志文件,并对比两个日志文件的内容来判断实验是否成功。如果成功,则执行数据库操作和导入文件到目标目录。
7239

被折叠的 条评论
为什么被折叠?



