mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-07-28 12:02:00 +08:00
9 lines
241 B
Bash
Executable File
9 lines
241 B
Bash
Executable File
#!/bin/sh
|
|
LOOKFOR=$1
|
|
KILLLIST=$(ps | grep $LOOKFOR)
|
|
echo "$KILLLIST" | while read line; do
|
|
if `echo "$line" | grep "/$LOOKFOR" > /dev/null` ; then
|
|
PIDV=$(echo $line | grep -o "^[0-9]\{1,5\}" | grep -o "[0-9]\{1,5\}")
|
|
kill $PIDV
|
|
fi
|
|
done |