#用于上线的时候文件清单的比较
Num1=`cat 1.txt|wc -l`
Num2=`cat 2.txt|wc -l`
num=0
echo "使用法:$0 参数1 参数2"
exit 1
else
if [ $Num1 -ne $Num2 ] ;then
echo "版本文件中的文件数目不一致"
else
echo "核对文件开始"
while read line
do
let num=num+1
echo "第$num行记录对比"
echo "$line"
sed -n "$num"p $2
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo "\n"
echo "请输入任意键继续下一条的对比"
(
while read name1</dev/tty
do
if [ $name1 != "y" ] ;then
echo "比较结束"
exit 1
else
echo "下一行比较开始"
exit 0
fi
done
)
value=`echo $?`
if [ $value = 1 ];then
exit 1
fi
done<$1
fi
fi