Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jul 2016 20:08:06 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Nikos Vassiliadis <nvass@gmx.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: jobs control in a /bin/sh script
Message-ID:  <20160711200806.14b4e22f.freebsd@edvax.de>
In-Reply-To: <3b55e09b-13d3-bdf2-e366-2c798ca9c1d2@gmx.com>
References:  <930cbcd1-2345-8a55-1b87-1691f5aa09a1@gmx.com> <20160710175219.48ef1d1a.freebsd@edvax.de> <3b55e09b-13d3-bdf2-e366-2c798ca9c1d2@gmx.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160711200806.14b4e22f.freebsd>