17 lines · 300 B · Text
RawDownload
#!/usr/local/plan9/bin/rc if(~ $#* 0)	pid=coreif not	pid=$1shiftif(! ~ $pid [0-9] [0-9]*[0-9] */core *.core core.* */core.* core){	name=$pid	pid=`{psu|awk '$NF=="'$name'" {print $2}'}	if(~ $#pid 0){		echo 'stack: no process '$name		exit none	}}for(p in $pid)	echo '$c' | 9 db -q $p $*