Page MenuHomePhabricator
Paste P3103

T134989.sh
ActivePublic

Authored by ema on May 14 2016, 11:03 PM.
Tags
None
Referenced Files
F4011885: T134989.sh
May 14 2016, 11:03 PM
Subscribers
None
#!/bin/bash
url="http://localhost:81/"
size=612
for x in {1..1000}; do
echo "$x -> $url"
curl -v -w 'SIZE: %{size_download}' -H 'X-Forwarded-Proto: https' -H 'Host: query.wikidata.org' $url 2>&1 | tee test.${x} | egrep 'SIZE|X-Cache| Age:'
sleep 4
grep "^SIZE: ${size}$" test.${x} > /dev/null && rm test.${x}
done