提交代码

This commit is contained in:
halliday 2023-11-30 21:51:28 +08:00
parent 8b09974dc7
commit 727ffa9157
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
#!/bin/bash
#set -x
PRG="$0"
while [ -h "$PRG" ]; do
ls=$(ls -ld "$PRG")
link=$(expr "$ls" : '.*-> \(.*\)$')
if expr "$link" : '.*/.*' >/dev/null; then
PRG="$link"
else
PRG=$(dirname "$PRG")/"$link"
fi
done
PRGDIR=$(dirname "$PRG")
#full path
cd $PRGDIR
ROOT_DIR=$(pwd)
cd - >/dev/null
# 加载Python3环境
if [ -f /opt/rh/rh-python38/enable ]; then
source /opt/rh/rh-python38/enable
fi
function check_sucessful
recode=`mysql -uunadba -p1223Bc@2008 unary -e 'select 1-(tb1.n1/tb2.n2) from ( (select sum(number) as n1 from ( select operdesc,count(*) as number from tbl_jobhistory where policyname="长期系统" and compid="bd22ea57feecb5a7f96e67035c204e02" group by operdesc) as tmp1 where tmp1.operdesc like "%失败%") as tb1 right JOIN (select count(*) as n2 from tbl_jobhistory where policyname="长期系统" and compid="bd22ea57feecb5a7f96e67035c204e02") tb2 on 1=1);' | tail -1`