Bash timeout function June 3, 2010Linux/BSDbert2002 TIMEOUT=”60″ $MYPROGRAM >/dev/null & pid=$! sleep $TIMEOUT && kill -9 $pid >/dev/null 2>&1 && echo “$MYPROGRAM failed”