api_url=192.168.1.4:12481 #echo ${api_url/:/ }a #echo `echo $api_url|sed -i 's/:/ /' ` #echo `cat 192.168.1.4:12481|sed -i 's/:/ /' ` #sed 'as/:/ /' (sleep 1;)|telnet ${api_url/:/ }|cat #替换并检测数据 str4=`(sleep 1;echo AA;sleep 1; echo 123; sleep 1; echo tail -f /aa/log/a.log;sleep 1) | telnet ${IP} | grep ${tempValue}` num4=`echo ${#str4}` if [ ${num4} -eq 0 ];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/` #加入及时统计
时间: 2024-09-20 16:10:30