BashScripts.org
http://bashscripts.org/forum/

cURL Domain Details
http://bashscripts.org/forum/viewtopic.php?f=7&t=1063
Page 1 of 1

Author:  draik [ Sun Apr 11, 2010 12:00 pm ]
Post subject:  cURL Domain Details

This script was provided to us by my professor. I changed it a bit for usage and readability.
Is there a way to output the page source (even if to /dev/null) and just keep the details?

Code:
#!/bin/bash

if [ $# = 0 ] ; then
     echo ""
     echo " USAGE: $0 domain"
     echo " Example: $0 bashscripts.org"
     echo ""
else

curl $1 -w "http_code:%{http_code} \
| time_connect:%{time_connect} \
| time_total:%{time_total} \
| time_namelookup:%{time_namelookup} \
| speed_download:%{speed_download} \
| size_header:%{size_header}"

echo ""

fi

Page 1 of 1 All times are UTC - 6 hours
© 2000, 2002, 2005, 2007 phpBB Group • http://www.phpbb.com