* 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
* Re: jobs list
1992-04-20 0:46 jobs list Julian L. Ho
@ 1992-04-20 9:19 ` Matthew Farwell
0 siblings, 0 replies; 2+ messages in thread
From: Matthew Farwell @ 1992-04-20 9:19 UTC (permalink / raw)
To: rc
In article <703730762.2950.0@elementary.bh.andrew.cmu.edu> you write:
>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...
> [ deleted ]
Course, if you had a sensible ps.....
Script started on Mon Apr 20 10:16:37 1992
; sleep 3600 & sleep 3600 & sleep 3600 &
14342
14343
14344
; echo $apids
14342 14343 14344
; ps -fp,^$apids
UID PID PPID C STIME TTY TIME COMMAND
dylan 14342 14341 0 10:16:45 p0 0:00 sleep 3600
dylan 14343 14341 0 10:16:49 p0 0:00 sleep 3600
dylan 14344 14341 0 10:16:53 p0 0:00 sleep 3600
;
script done on Mon Apr 20 10:17:13 1992
Dylan.
--
"It's at times like this I wish I'd listened to what my mother used to say"
"Why, what did she say?"
"I don't know - I never listened."
^ 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).