perl 分析binlog 生成update sql

来源:互联网 发布:广州有mac专柜吗 编辑:程序博客网 时间:2024/05/19 19:16
if [ $# -ne 2 ]then   echo "请输入update xx"elseperl ./get_num.pl $1 $2 if [ $? -eq 0 ]  then   sh ./sed.sh fifiopen (A,"<","a.txt");open (B,">","b.txt");$a=$ARGV[0];$b=$ARGV[1]; while (<A>) {                $num++;                if (( $_ =~/$a\s+$b/i ) or ($_ =~/$a\s+`zjzc`.`$b/i) )  { $c = $num;print B ("$c\n"); };               }   cat b.txt | while read A donum1=`expr $A - 3`num2=`expr $A + 3`sed -n ''$num1','$num2'p' a.txtdone

0 0
原创粉丝点击