9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] lstk script
@ 2023-08-14  8:50 umbraticus
  2023-08-14  9:21 ` qwx
  0 siblings, 1 reply; 3+ messages in thread
From: umbraticus @ 2023-08-14  8:50 UTC (permalink / raw)
  To: 9front

The lstk script recently committed is a handy tool.
I humbly submit the version which I have been using.
If there are multiple broken processes it prints them
in a sendable format instead of just picking most recent.

#!/bin/rc
rfork e
p = `{ps | awk '/Broken/{print $2 " "$7}'}
if(~ $#p 2){
	echo 'echo ''lstk()'' | acid' $p(1) '#' $p(2)
	echo 'lstk()' | acid $p(1)
	exit $status
}
fn list{
	while(! ~ $#* 0){
		echo 'echo ''lstk()'' | acid' $1 '#' $2
		shift; shift
	}
}
list $p


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-14 15:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-14  8:50 [9front] lstk script umbraticus
2023-08-14  9:21 ` qwx
2023-08-14 15:15   ` Stanley Lieber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).