rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
* jobs list
@ 1992-04-20  0:46 Julian L. Ho
  1992-04-20  9:19 ` Matthew Farwell
  0 siblings, 1 reply; 2+ messages in thread
From: Julian L. Ho @ 1992-04-20  0:46 UTC (permalink / raw)
  To: rc

I've been using "echo $apids" and "ps pid" a lot recently, so I wrote
this.  I don't know if I like it yet...

-J

fn jobs {

    if (! ~ $#* 0) {
	# list commands with current tty
	ps guxwwt ^ `{ tty | sed 's/.*\(..\)$/\1/' }
	return
    }

    if (~ $#apids 0)
	return

    # list $apids
    pat = ( '$2 == ' ^ $apids ^ ' ||' ) {
	pat = $^pat ^ 'NR == 1'
	ps guxww | awk $pat
    }

}


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

end of thread, other threads:[~1992-04-20 14:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1992-04-20  0:46 jobs list Julian L. Ho
1992-04-20  9:19 ` Matthew Farwell

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).