-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
- Loading branch information
1 parent
f6e1ace
commit 452c563
Showing
1 changed file
with
16 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
#!/bin/bash | ||
CURL="/usr/bin/curl" | ||
GAWK="/usr/bin/gawk" | ||
echo -n "Please pass the url you want to measure: " | ||
read url | ||
#!/usr/bin/env bash | ||
|
||
# This script appeared in IBM Linux Technical Journal many moons ago. I have | ||
# modified it to suit my convenience. Probably one written by M.Tim.Jones or | ||
# Ian Shield ,not sure who it was, because I can't remember it. | ||
|
||
|
||
CURL=$(command -v curl) | ||
GAWK=$(command -v 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}' | ||
echo " Time_Connect Time_startTransfer Time_total " | ||
echo $result | $GAWK -F: '{ print $1" "$2" "$3}' | ||
|