Skip to content

Instantly share code, notes, and snippets.

@leobalter
Last active December 27, 2015 06:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leobalter/7280160 to your computer and use it in GitHub Desktop.
Save leobalter/7280160 to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ $1 == "android" ]; then
UA='Mozilla/5.0 (Android; Mobile; rv:18.0) Gecko/18.0 Firefox/18.0'
shift # removes the first argument if it's "android"
else
UA='Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0'
fi
while [ "$#" -gt "0" ]
do
echo "Reports for $1";
http --print=HBh --follow $1 User-Agent:"$UA"
curl -L --head -A "$UA" $1
shift
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment