Skip to content

Instantly share code, notes, and snippets.

@raku-cat raku-cat/cowping.sh
Created Mar 3, 2016

Embed
What would you like to do?
#/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
You can’t perform that action at this time.