Re:Why use www?
by wangman on Sunday January 31, 2016 @12:45PM
(#11007129)
Thanks, it sure looks less ugly with -o/dev/null{,}
I couldn't find any other way to get curl to stay silent and still output redirect times. Hence the crude hack.
(Obviously my bash and curl versions had no problem with the spaces or I wouldn't have posted it)
[ Parent
| on HN ]
Using the curl'ing tips up this branch of comments I programmed a highly sophisticated script and dropped it on github. :)
Nice!
I would have gone for a simpler loop:
echo -e "sec\tmethod\turl";for url in {https,http}://{www.,}{en.wikipedia.org,{google,reddit,facebook,youtube,netflix,amazon,twitter,linkedin,msn}.com,google.co.in}; do curl -sL "$url" -w "%{time_redirect}\t${url%:}\t${url#//}\n" -o/dev/null; done|sort