12 lines
198 B
Bash
12 lines
198 B
Bash
|
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
|
||
|
}
|