kill old programs in test setup

This commit is contained in:
Rohit Gupta
2016-08-23 19:41:09 +02:00
parent 57f7b88994
commit 84a6f9f4ca
3 changed files with 8 additions and 5 deletions
@@ -1,7 +1,9 @@
#!/bin/bash
#$1 programs to be killed and checked
var=`ps -A |grep -E -i $1`
ps -aux |grep -E -i $1| awk \'{print $2}\' | sudo xargs kill -9
var=`ps -aux |grep -E -i $1`
echo $var
if [ -n "$var" ]; then echo 'Match found'; else echo 'Match not found' ;fi