line_push/paied/allmember/PUSHMESSAGE.sh
2022-07-17 13:16:16 +08:00

21 lines
631 B
Bash
Executable File

#!/bin/bash
cd /root/TS832xu/Deverloper/liff-push_2series_paied/paied/allmember
rm -f users
wget https://json_2series.digitalent.tw/users
ID_COUNT=`jq . users|grep id| tail -n1 |awk -F " " '{ print $2 }'`
echo $ID_COUNT
for ((i=1;i<=12;i++))
do
LINEUserID=`curl -s https://json_2series.digitalent.tw/users?id=$i |grep LINEUserID|awk -F "\"" '{ print $4 }'`
echo $LINEUserID
touch push.tmp
touch push2.tmp
cat PUSHMESSAGE.up.tmp > push.tmp
cat BoardingCard.FLEX.tmp.$i >> push.tmp
cat PUSHMESSAGE.down.tmp >> push.tmp
echo -n `cat push.tmp` > push2.tmp
sed -i "s/LINEUSERID/${LINEUserID}/g" push2.tmp
/bin/bash push2.tmp
done