mirror of
https://github.com/nasa/trick.git
synced 2024-12-24 07:16:41 +00:00
26 lines
477 B
Plaintext
26 lines
477 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
#
|
||
|
# $Id: kill_sim 2477 2012-06-27 17:50:59Z wwoodard $
|
||
|
|
||
|
if [ `uname -s` = "SunOS" ]
|
||
|
then MY_UID=`/usr/xpg4/bin/id -u`
|
||
|
else
|
||
|
MY_UID=`id -u`
|
||
|
fi
|
||
|
|
||
|
if [ `uname -s` = "Linux" ]
|
||
|
then PS_ARGS="-fw -u $MY_UID"
|
||
|
elif [ `uname -s` = "Darwin" ]
|
||
|
then PS_ARGS="-u $MY_UID"
|
||
|
else
|
||
|
PS_ARGS="-f -u $MY_UID"
|
||
|
fi
|
||
|
|
||
|
MY_PROCESSES=`ps $PS_ARGS | grep [sST]_main_ | grep -v grep | awk '{print $2}'`
|
||
|
|
||
|
for i in $MY_PROCESSES
|
||
|
do echo "kill -9 $i"
|
||
|
`kill -9 $i`
|
||
|
done
|