发布网友 发布时间:2022-04-10 07:31
共2个回答
懂视网 时间:2022-04-10 11:53
远程批量查询sql脚本 for i in {1..50} do sql_ip=172.168.0.${i} information=`mysql -h ${sql_ip} -uroot -ppassword dbname -e ‘select name,value from setting where name = "name" UNION select name,value from setting where name = "code" ‘ |grep -v val ue|awk -F ‘ ‘ ‘{print $2}‘|awk -F ‘\‘ ‘{print $3}‘` echo ${information} > information.txt code=`cat information.txt` token_tab=`mysql -h ${sql_ip} -uroot -ppassword dbname -e ‘select name,value from setting where name = "token"‘|grep -v value|awk -F ‘\‘ ‘{print $3}‘` echo ${token_tab} > token_file.txt sed ‘s/0//g‘ token_file.txt > token.txt token=`cat token.txt` echo "${token} this name is "${code}"" >> integ.txt done批量查询sql脚本
标签:ken set sele 批量 word 远程 查询 his ppa
热心网友 时间:2022-04-10 09:01
复制以下语句到查询分析器,设置好自己的数据库名字和登录名。