From fd652ac3195e155c8c0a4cb8ec104b029f40628e Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 10 Jul 2008 11:05:34 -0400 Subject: stack: look in core by default --- bin/stack | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bin/stack') diff --git a/bin/stack b/bin/stack index 933a6132..5744cef9 100755 --- a/bin/stack +++ b/bin/stack @@ -1,8 +1,11 @@ #!/usr/local/plan9/bin/rc -pid=$1 +if(~ $#* 0) + pid=core +if not + pid=$1 shift -if(! ~ $pid [0-9] [0-9]*[0-9] */core *.core core.* */core.*){ +if(! ~ $pid [0-9] [0-9]*[0-9] */core *.core core.* */core.* core){ name=$pid pid=`{psu|awk '$NF=="'$name'" {print $2}'} if(~ $#pid 0){ -- cgit v1.2.3