ref: 2933bdfe733ad246eb56897eb7209fc8f860e90d
parent: 29631970c9391c35c59f521f3ba8a457b1ffe6d2
author: qwx <qwx@sciops.net>
date: Fri Oct 21 04:20:43 EDT 2022
lstk: greedily catch matches to as many fields as possible default: match Broken states; unlikely a binary will be named that way; giving a numeric pid will also rarely clash with binary name
--- a/bin/lstk
+++ b/bin/lstk
@@ -12,7 +12,7 @@
shift
}
psd $p
-p=`{ps | awk -v 'P='^$p '$7 == P || $2 == P{ p=$2 } END{ print p }'}
+p=`{ps | awk -v 'P='^$p '$7 == P || $2 == P || $6 == P{ p=$2 } END{ print p }'}
if(~ $#p 0){
echo no proc $p >[1=2]
exit noproctohand