api_url=192.168.1.4:
#echo ${api_url/:/ }a
#echo `echo $api_url|sed -i 's/:/ /' `
#echo `cat 192.168.1.4:|sed -i 's/:/ /' ` #sed 'as/:/ /'
(sleep ;)|telnet ${api_url/:/ }|cat #替换并检测数据 str4=`(sleep ;echo AA;sleep ; echo ; sleep ; echo tail -f /aa/log/a.log;sleep ) | telnet ${IP} | grep ${tempValue}`
num4=`echo ${#str4}`
if [ ${num4} -eq ];then
echo "==::在a.log文件中没有找到关键字KEY,请检查!"
sheet4="@NULL"
else
echo "==::在a.log文件有找到关键字KEY!"
sheet4="@OK"
fi
mysql 检测连接的
mysql -u${db_remote_user} -p${db_remote_password} -P${db_port} -h${db_host} -e "select count(*) from ${db_name}.grole;" |sed -n 2p
mysql -e 很好用,也很强大
sed -i 's/\r//' ${api_file_path}
sed -i "s/; \#sed\#/ ${serverid}; \#sed\#/g" `grep \;\ \#sed\# -rl ./` #加入及时统计
sed -i "s/; \#sed\#/ ${serverid}; \#sed\#/g" `grep \;\ \#sed\# -rl ../jackluo/` #加入及时统计