???shell???????????????
???????????? ???????[ 2014/9/2 11:13:30 ] ????????shell ?????? ???
???????shell???????Щ???????Щ????????????????????????????????????д????????????????????????????????????????????ж???
???????????????????????12c.sh ???Щ????????а?????з??????????????????????????????????????????35%??40%??25%
??????data???????Щ??????????????????????????
sqlplus -s n1/n1 <<EOF
set linesize 150
set pages 0
set feedback off
spool check_$1.sh
select 'ksh 12c.sh'||w||' '||t||' '||l||' '||rw||' '||rt||' '||rl||' ' from data where r=-1 and startdate='$1';
spool off;
EOF
ksh check_$1.sh |tee check_$1.log
grep suggest check_$1.log |awk '{print $7" "$8" "$9" "$10" "$11" "$12" "$1" "$2" "$3" "$4" "$5" "$6}'>>filter_check.log
cat filter_check.log
function get_result
{
echo $1
sqlplus -s n1/n1 <<EOF
set pages 0
select case when zhu>ke+1
then rpad('big win:'??20)||to_number(w+rw)||' '||'$2'||'??'||'$3'||'??'||'$4'||'??'||'$5'||'??'||'$6'||'??'||'$7'
when zhu=ke+1
then rpad('little win:'??20)||to_number(w+rt)||' '||'$2'||'??'||'$3'||'??'||'$4'||'??'||'$5'||'??'||'$6'||'??'||'$7'
when zhu=ke
then rpad('tie:'??20)||to_number(t+rl)||' '||'$2'||'??'||'$3'||'??'||'$4'||'??'||'$5'||'??'||'$6'||'??'||'$7'
when zhu=ke-1
then rpad('little lose:'??20)||to_number(l+rl)||' '||'$2'||'??'||'$3'||'??'||'$4'||'??'||'$5'||'??'||'$6'||'??'||'$7'
when zhu<ke-1
then rpad('big lose:'??20)||to_number(l+rl)||' '||'$2'||'??'||'$3'||'??'||'$4'||'??'||'$5'||'??'||'$6'||'??'||'$7'
end
end from data where startdate='$1' and w=$2 and t=$3 and l=$4 and rw=$5 and rt=$6 and rl=$7 order by (zhu-ke);
EOF
}
while read line
do
echo ---start
echo $line
input_params=`echo $line|awk '{print $1" "$2" "$3" "$4" "$5" "$6}'`
get_result $1 $input_params
echo ....end
echo .
done <filter_check.log
rm check_$1.log
rm filter_check.log
rm check_$1.sh
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11