Vote count:
0
I am trying to make a script were it compares the output of the /results file when it equals 1.
#!/bin/sh
RESULTS=/results
$
while true
do
ping -c 5 1.1.1.1 > /dev/null && echo "1" > /results || echo "0" > /results
if
[ $RESULTS = "1" ];
then
echo "working"
sleep 5
else
echo "not working"
sleep 5
fi
done
asked 13 secs ago
Aucun commentaire:
Enregistrer un commentaire