常用shell脚本
#!/bin/bash
while true;do
echo "************************************************************"
date
# ==============================================================
userID=804
gameID=160
REFUND_ID=`cat server.log | grep "Refund" | awk -F 'ID: ' 'END{print $2}'`
echo $REFUND_ID
curl -i -H "Accept:application/json" -X POST -d "{"user_id":804,"game_id":160,"refund_id":"${REFUND_ID}"}" http://onlyellow.cstor.cn:18888/launch_refund
sleep 2;
done
#!/bin/bash
while true;do
echo “************************************************************”
date
userID=804
gameID=160
REFUND_ID=`cat server.log | grep “Refund” | awk -F 'ID: ’ ‘END{print $2}’```
echo KaTeX parse error: Can't use function '"' in math mode at position 61: …" -X POST -d "{̲"̲user_id":804,…{REFUND_ID}"}" http://onlyellow.cstor.cn:18888/launch_refund
sleep 2;
done
#!/bin/bash sleep 3 wget <二进制文件地址> -O /root/server.bin wget <配置文件地址> -O /root/server.ini chmod a+x /root/server.bin cd /root /root/server.bin
#!/bin/bash
sleep 3
wget <二进制文件地址> -O /root/server.bin
wget <配置文件地址> -O /root/server.ini
chmod a+x /root/server.bin
cd /root
/root/server.bin
奇奇怪怪的dockerfile
FROM amazonlinux COPY test.sh /opt RUN yum install -y wget RUN chmod +x /opt/test EXPOSE 80 CMD ["/opt/test.sh","-D FOREFROUD"]
FROM amazonlinux
COPY test.sh /opt
RUN yum install -y wget
RUN chmod +x /opt/test
EXPOSE 80
CMD ["/opt/test.sh","-D FOREFROUD"]



