Register
It is currently Tue Jul 22, 2014 7:11 pm

cURL Domain Details


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Sun Apr 11, 2010 12:00 pm   

Joined: Sat Apr 03, 2010 1:47 pm
Posts: 6
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


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP