#!/bin/bash if [[ -z "$1" ]]; then echo "Please enter IP, ex.: $0 127.0.0.1" exit else echo "Logfile: /tmp/ping_$1" fi while true do while ! ping -c1 $1 &>/dev/null do echo "Ping Fail - `date`" >> /tmp/ping_$1 done echo "Host Found - `date`" >> /tmp/ping_$1 sleep 1 done
Комментариев нет:
Отправить комментарий