#!/bin/sh while [ true ] do ping $1 > /tmp/ip2 #sleep 1 done