hosts=(192.168.0.1 127.0.0.1)
ports=(10001 11001 12001)
echo ‘‘ > /tmp/advertSystem.txt
for host in ${hosts[*]}
do
for port in ${ports[*]}
do
url="http://${host}:${port}/adfront/v1/_mget?appKey=59D63E8DB3212DAADEA1AA1AECCAB6A0&advId=100279&systemType=0&cityId=360100&specId=41137&userAgent=app&urlRefer=specsummary"
echo ${url} >> /tmp/advertSystem.txt
echo " " >> /tmp/advertSystem.txt
curl -X GET "${url}" >> /tmp/advertSystem.txt
echo "-----------------------------------------------------------------" >> /tmp/advertSystem.txt
done
done
原文:https://www.cnblogs.com/xuxu-dragon/p/13426017.html