echo
echo -e "Enter host ip: c"
read -r usrip
echo -e "Enter result file name: c"
read -r resdump
echo
touch /tmp/$resdump
echo "" > /tmp/$resdump
echo "========== Detail result for $usrip in /tmp/$resdump =========="
echo
until ping $usrip -c 3 >> /tmp/$resdump
do
echo "Host $usrip is down."
sleep 1
done
echo
echo "Host $usrip is up."
echo