for((i=0;i<43;i++))
do
var=$(cat data/data$i.txt)
#echo $var;
sql="select u.id,u.real_id,case u.type when '1' then 'passport' when '2' then 'uc' else '' end user_type, d.mobile,d.email from aip_user u left join aip_dev_info d on u.id=d.user_id where u.id in ${var}"
#echo $sql;
mysql -hcq02-dba-mars-200.cq02 -P3200 -uxxxx -pxxx -Dtest -e "${sql}">>result.xls
sleep 1
done
https://awk.readthedocs.io/en/latest/chapter-one.html