jobs control in a /bin/sh script

Polytropon freebsd at edvax.de
Mon Jul 11 18:08:16 UTC 2016


On Sun, 10 Jul 2016 21:49:51 +0300, Nikos Vassiliadis wrote:
> 
> 
> On 07/10/16 18:52, Polytropon wrote:
> > JOBS=`jobs -p`
> 
> Thank you, that would do what I want. It's rather strange that
> the other construct doesn't work. But this workaround would do:)

In case of a shell script, calling the "jobs" command will invoke
an internal (shell builtin) command, and this one seems to be
unable to use redirection. There also is the /usr/bin/jobs binary,
but it doesn't seem to work as desired in the scripting context...



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list