#!/bin/sh r=`ps -eaf | grep | grep -v grep | grep -v vi` if [ $? -eq 1 ] then /run/the/script else sleep 10 /re/run/this/script fi