1 #!/bin/bash
2 NamePid=$HOME/union_5g/exe
3
4 ID=`ps -ef | grep $NamePid | grep -v "$0" | grep -v "grep" | grep -v "swdbusagt" | awk '{print $2}'`
5 if [ -z "$ID" ];then
6 exit
7 fi
8 #echo "==" $ID
9 kill $ID
1 #!/bin/bash
2 NamePid=$HOME/union_5g/exe
3
4 ID=`ps -ef | grep $NamePid | grep -v "$0" | grep -v "grep" | grep -v "swdbusagt" | awk '{print $2}'`
5 if [ -z "$ID" ];then
6 exit
7 fi
8 #echo "==" $ID
9 kill $ID