#!/bin/bash
ip=192.168.1.36
check_ret=`ping $ip -c 2 | grep -q 'ttl=' && echo "yes" || echo "no"`
idx=1
echo $check_ret
while [ $check_ret = "no" ]
do
echo "$idx.okhelper"
((idx += 1))
check_ret=`ping $ip -c 2 | grep -q 'ttl=' && echo "yes" || echo "no"`
sleep 1
done
echo $ip "ready"