Add aping audible ping tool

This commit is contained in:
David Thurstenson 2022-04-20 16:30:32 -05:00
parent 5eb94d830e
commit d73734401e
1 changed files with 11 additions and 0 deletions

11
.bashrc.d/aping.bash Normal file
View File

@ -0,0 +1,11 @@
aping() { # aping: beep when ping fails (reverse behavior of `ping -a <address>`)
local address="$1"
while true; do
if ping -c 1 $address; then
:
else
printf "\a"
fi
sleep 1
done
}