linux监听进程执行

#!/bin/sh  
 
flag=1  
result=1  
while [ "$flag" -eq 1 ]  
do  
sleep 1s  
result=`pidof top`  
if [ -z "$result" ]; then  
echo "process is finished"  
flag=0  
fi  
done

https://www.geek-share.com/detail/2566447704.html

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注