日常常用shell命令
getBatidSql="select ts_bat_id from ts_bat where gen_date>='2022-03-01' and gen_date<'2022-04-01' and op_mode='J' and city_id='${city_Id}' and state<>'50X'"
batId=`/data/dubbo/sh/mysql/acct_select.sh ${area} sql "${getBatidSql}"|awk -F ' ' '{a=a$1","}END{print a}'|sed 's/.$//'`
if [ "${batId}" = "" ];then
batId=0
fi
对于取得的数据,转化为一串字符串。
area=`cat /home/telepay/dengg/1haohuakou/cityRegion.txt|awk '$3=="'$city_id'"{print $4}'`
取得指定值
浙公网安备 33010602011771号