diff options
| author | Horus3 | 2015-11-25 18:41:06 +0100 |
|---|---|---|
| committer | Horus3 | 2015-11-25 18:41:06 +0100 |
| commit | aea6024d1bf3d3d42a6778de12d730adf4de114b (patch) | |
| tree | 7e97daa4d45b5edf1068c149ccbd1d3f0cb3956b | |
| parent | 4a5a08dcc6cf209203efccad9cc2714beb9fdb50 (diff) | |
| download | dotfiles-aea6024d1bf3d3d42a6778de12d730adf4de114b.tar.gz | |
Rename checkswap -> swap. Inline resources in respondtime.sh.
| -rwxr-xr-x[-rw-r--r--] | bin/nwhois.sh | 0 | ||||
| -rwxr-xr-x | bin/respondtime.sh | 23 | ||||
| -rwxr-xr-x | bin/swap (renamed from bin/checkswap) | 0 | ||||
| -rw-r--r-- | resources/curlinfo.txt | 8 |
4 files changed, 17 insertions, 14 deletions
diff --git a/bin/nwhois.sh b/bin/nwhois.sh index 9f0ea77..9f0ea77 100644..100755 --- a/bin/nwhois.sh +++ b/bin/nwhois.sh diff --git a/bin/respondtime.sh b/bin/respondtime.sh index de0731b..6d5b9e4 100755 --- a/bin/respondtime.sh +++ b/bin/respondtime.sh @@ -1,16 +1,27 @@ #!/bin/bash # use cURL to measure the time until the webpage loads -CURLINFOTEXT="$(dirname $0)/../resources/curlinfo.txt" +CURLINFOTEXT=" + time_namelookup: %{time_namelookup} -if [ ! -f "$CURLINFOTEXT" ]; then - echo "$(tput setaf 1)$(tput bold)Failure. $(tput sgr0)No Info Text for cURL given." 1>&2 - exit 1 -fi + time_connect: %{time_connect} + + time_appconnect: %{time_appconnect} + + time_pretransfer: %{time_pretransfer} + + time_redirect: %{time_redirect} + + time_starttransfer: %{time_starttransfer} + + ---------- + + time_total: %{time_total} +" if [ -z "$1" ]; then echo "$(tput setaf 1)$(tput bold)Failure. $(tput sgr0)Missing URL or Hostname" 1>&2 exit 1 fi -curl -w "@$CURLINFOTEXT" -o /dev/null -s "$1" +curl -w "$CURLINFOTEXT" -o /dev/null -s "$1" diff --git a/resources/curlinfo.txt b/resources/curlinfo.txt deleted file mode 100644 index fa9ec7f..0000000 --- a/resources/curlinfo.txt +++ /dev/null @@ -1,8 +0,0 @@ - time_namelookup: %{time_namelookup}\n - time_connect: %{time_connect}\n - time_appconnect: %{time_appconnect}\n - time_pretransfer: %{time_pretransfer}\n - time_redirect: %{time_redirect}\n - time_starttransfer: %{time_starttransfer}\n - ----------\n - time_total: %{time_total}\n |
