Last active
December 27, 2015 06:18
-
-
Save leobalter/7280160 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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