#!/bin/sh
if [ $# -lt 1 ]
then
echo -e "Please Input $1 parameter!\n"
else
while(true)
do
PID=`ps -ef|grep "$1"|grep -v "grep"|awk '{print $1}'`
tmp=${PID:-"aaaa"}
if [ tmp != "aaaa" ]
then
$1 $2
else
echo -e "Current PID is $PID\n"
sleep(10)
fi
done
fi
posted on 2009-07-06 11:34
Super- 阅读(633)
评论(0) 编辑 收藏 引用