bash: psk verbessert

This commit is contained in:
Michael Grote 2021-11-09 11:00:29 +01:00
parent 33b239aee5
commit 7def120769

View file

@ -2,8 +2,6 @@
function rgf { function rgf {
rg --files -g "*$1*" rg --files -g "*$1*"
} }
function psk {
ps -ef | grep $1 | grep -v grep | awk '{ print $2 }' | xargs kill -9
} }
function ffind { function ffind {
find $1 -type f -name $2 find $1 -type f -name $2
@ -46,3 +44,16 @@ function m2m {
fi fi
fi fi
} }
function psk {
if [[ "$1" == "--help" ]]; then
echo "Beende Prozess '$1'"
echo "psk = ps kill"
echo "psk <prozessname>"
else
if [ -z "$1" ]; then
echo "Prozessname fehlt..."
else
ps -ef | grep $1 | grep -v grep | awk '{ print $2 }' | xargs kill -9
fi
fi
}