Есть скрипт
#!/bin/bash
mkdir ./scriptlogs
while :
do
ping -c 100 192.168.1.1 | grep % | awk '{print $6 }' > mytest.tmp
i=`cat mytest.tmp | grep % | awk 'BEGIN {FS = "%"} {print $1}'`
if [ $i != 0 ]
then
beep -f 900 -l 1000
script_data=`date +%Y.%m.%d`
script_vremya=`date +%H:%M:%S`
script_procent=`awk '{print $1}' mytest.tmp`
echo "$script_vremya $script_procent 192.168.1.1." >> ./scriptlogs/192.168.1.1pinglog_$script_data.log
fi
rm mytest.tmp
sleep 5
done