more count_table_count.sh#! /bin/bash>table_count.txtmysql  -uroot -p123123 -h192.168.10.100 -e "use rrmj;show tables;"|sed '/Tables_in_rrmj/d;/category/d;/duplicate_user/d;/login_user/d;/resource/d;/resource_category_rel/d;/resource_detail/d;/tmp/d;/user/d' >tables.txtfor table in `cat tables.txt`doecho "$table">>count.txtmysql  -uroot -p123123 -h192.168.10.100 -e "use rrmj;select count(*) from $table;">>count.txtdonesed -i  "/\*/d" count.txtsed -i '$!N;s/\n/   /' count.txtsort  -k 2 -nr count.txt >table_count.txtrm -f count.txtrm -f tables.txt

 

效果如下截图: