Last active
August 29, 2015 14:02
-
-
Save cassler/f3b93f23f18a6ee05e3e to your computer and use it in GitHub Desktop.
Timed CURL
This file contains hidden or 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/bash | |
CURL="/usr/bin/curl" | |
GAWK="/usr/bin/gawk" | |
echo -n "Please pass the url you want to measure: " | |
read url | |
URL="$url" | |
result=`$CURL -o /dev/null -s -w %{time_connect}:%{time_starttransfer}:%{time_total} $URL` | |
echo " Time_Connect Time_startTransfer Time_total " | |
echo $result | $GAWK -F: '{ print $1" "$2" "$3}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment