Re: [Help-bash] How to make variable set in () accessible outside?
From:
Greg Wooledge
Subject:
Re: [Help-bash] How to make variable set in () accessible outside?
Date:
Thu, 3 May 2012 08:15:14 -0400
User-agent:
Mutt/1.4.2.3i
On Thu, May 03, 2012 at 06:06:11AM -0500, Peng Yu wrote:
>http://lists.gnu.org/archive/html/help-bash/2012-02/msg00000.html
"This solution and other solutions (including gnu parallel) suffer the
problem of not able to understand bash function."
So, you are *still* trying to create an N-job scheduler that can schedule
bash functions?
And none of the examples in http://mywiki.wooledge.org/ProcessManagement
were helpful?
Is there a particular reason why your scheduler can't schedule a job
that is bash -c 'source /path/to/myfunc; myfunc'?
Have you also rejected the alternative method of exporting the function
through the environment (bash to bash)? In that case, the job you
schedule would simply be bash -c 'myfunc', with myfunc having been
exported in advance.
Or in other words, "What are you trying to do?"