[Pdx-pm] job control
Randall Hansen
perl at sonofhans.net
Sun Jun 1 20:15:33 CDT 2003
Folks ~
I'm trying to get a list of bash's suspended jobs using Perl. I
initially thought this would be trivial (e.g. perl -e "print exec
jobs"), but I've yet to succeed. I tried permutations of "system,"
"exec," backticks, etc. The closest I've come is: $ perl -e "print
`jobs`" which apparently does an eval on the output of jobs (causing
errors and yielding nothing useful). But what I really want is to
capture and examine the output, not echo it.
It occurs to me (after seeing "No such file ..." a few times) that
technically jobs is a builtin of bash, not a system command. This
hasn't gotten me any closer. I can start a new bash with perl, but
can't figure out how to send builtins to an existing one.
Which in turn makes me think that this may be more of a bash question
than a Perl one, but I thought I'd ask anyway.
TIA,
r
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/pdx-pm-list/attachments/20030601/23b97b56/attachment.bin
More information about the Pdx-pm-list
mailing list