标签:mysql 循环比对数据
#!/bin/bash
dir_1="/tmp/check/177/*"
log_dir="/tmp/check/"
mysql_1="mysql - -p-h -P3336"
db_1=`ls -1 $dir_1`
for db_1 in $db_1;
do
echo "正在执行检查"${db_1}"数据"
${mysql_1} < ${db_1} >> ${log_dir}check.txt
done
dir_2="/tmp/check/178/*"
log_dir="/tmp/check/"
mysql_2="mysql - -p-h -P3336"
db_2=`ls -1 $dir_2`
for db_2 in $db_2;
do
echo "正在执行检查"${db_2}"数据"
${mysql_2} < ${db_2} >> ${log_dir}check.txt
done
/177/count语句
本文出自 “隐隐的泪” 博客,请务必保留此出处http://lijuntao.blog.51cto.com/11691147/1959847
标签:mysql 循环比对数据
原文地址:http://lijuntao.blog.51cto.com/11691147/1959847