From 89cab0c26e1f8cd8ec782d112a9f495af32d11c2 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 22 Nov 2014 06:27:24 +0300 Subject: [PATCH] killall can also be used to kill processes by name --- .shellrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.shellrc b/.shellrc index 2ef0bdb..b6c9892 100644 --- a/.shellrc +++ b/.shellrc @@ -81,7 +81,7 @@ pswg() { ps auxwww | grep -i ${1:+"$@"} | grep -v '\(ps auxw\|grep\)'; } # Like pgrep -f pidOf() { ps auxwww | grep -i ${1:+"$@"} | grep -v '\(ps auxw\|grep\|pidOf\|KillAll\)' | awk '{print $2}'; } -# A kind of pkill +# A kind of pkill/killall KillAll() { if [ -z "$2" ]; then kill `pidOf "$1"` -- 2.39.5