bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problems substituting 'jobs' in a bash script


From: Eric Blake
Subject: Re: problems substituting 'jobs' in a bash script
Date: Thu, 21 Feb 2008 22:24:35 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Robert Whent (rwhent) on 2/21/2008 10:59 AM:
|
| JOBS=`jobs`
|
| echo $JOBS
|
| this return nothing at all

As well it should.  jobs returns information about the current shell's
jobs.  But inside ``, the command is executed in a subshell.  The subshell
has no child processes of its own (but is one of the children of the
parent collecting the `` output).  And for this reason, jobs has to be a
shell builtin rather than an external application.

|
| I have also trawled the web and can find no reports of any issues ?
|

Try reading this link, especially under Application Usage
http://www.opengroup.org/onlinepubs/009695399/utilities/jobs.html

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHvlyT84KuGfSFAYARAmclAJ95ZIbKzGkaHB/Uzsb+16w8SKqWfwCdF4ao
6V+PKubsshFXciskWd27ftk=
=giAF
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]