Files
Bash_Scrips/scripts/test_scripts/ping_test.sh
2025-06-23 21:19:51 +02:00

19 lines
205 B
Bash

#!/bin/bash
HOSTS=(host1
host2
)
uptime_mv ()
{
for host in "${HOSTS[@]}" ;
do
PONG=$(ping -c 1 $host)
echo "$(date) $PONG" >> ping_$host.log &
done
}
while true ;do
uptime_mv ;
sleep 1
done