3 interval="$2"; [ -z "$interval" ] && interval=1
5 if [ -z $command ]; then
6 echo 'Usage: watch.sh "command [options]" [interval], e.g. watch "ifconfig ath0" 2'
7 echo 'interval is optional and defaults to 1'
11 while true; do clear; $command; sleep $interval; done