Skip to content

Instantly share code, notes, and snippets.

@raku-cat
Created March 3, 2016 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raku-cat/39a8da0e0637cf3c2b9d to your computer and use it in GitHub Desktop.
Save raku-cat/39a8da0e0637cf3c2b9d to your computer and use it in GitHub Desktop.
#/bin/bash
if [[ "$1" != "" ]];
then
url="$1"
else
url=google.com
fi
while : ;
do
cowp=$(ping $url | grep -o -m1 time=*.* | sed 's/^[a-z0-9]\+\=//')
if [ -n "$cowp" ] && [ $(echo $cowp | sed 's/^.*\(..\)$/\1/') == "ms" ]
then
clear &
echo -n " _______________________________________
< The current response time is $(echo $cowp && unset cowp) >
---------------------------------------
\\\\
\\\\
^__^
_______/(oo)
/\/( /(__)
| W----|| |~|
|| || |~| ~~
|~| ~
|_| o
|#|/
_+#+_
"
else
cowsay -f head-in "The url was wrong or your shits fucked IDK"
exit
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment