#!/bin/bash # # This script polls the network for an HD HomeRun device. # While no device is found, it prints a message and tries # again. # # when a device is found, it exits. # RESULT=`hdhomerun_config discover` #The -q option to grep suppresses output. while echo "$RESULT" | grep -q "no" do echo "No HDHomeRun found yet..." sleep 1 #do it again RESULT=`hdhomerun_config discover` done echo "$RESULT"