[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to do? Possible?
From: |
Linda Walsh |
Subject: |
Re: How to do? Possible? |
Date: |
Mon, 25 Jul 2011 10:33:12 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 |
Pierre Gaston wrote:
> Since you are already using global variables, why not simply use a
> couple more for the return values?
>
---
Because a subshell cannot access the global variables of the
parent.
The only 'hack' I came up with overnight for a quick & dirty, is
to pass back a "blob" along with the 3 return values the function normally
returns, which the parent will 'eval' in the parent context (contain
'export XXX=value' or 'alias xxx=/path' statements. The purpose of this
was to pre-verify the needed external utilities the script would be using
-- their paths and their existence so the script would be less likely to
fail non-deterministically later on.
- How to do? Possible?, Linda Walsh, 2011/07/25
- Re: How to do? Possible?, Pierre Gaston, 2011/07/25
- Re: How to do? Possible?,
Linda Walsh <=
- Re: How to do? Possible?, DJ Mills, 2011/07/25
- Re: How to do? Possible?, Linda Walsh, 2011/07/25
- Re: How to do? Possible?, Bob Proulx, 2011/07/25
- Re: How to do? Possible?, Linda Walsh, 2011/07/25
- Re: How to do? Possible?, Linda Walsh, 2011/07/25
- Re: How to do? Possible?, Eric Blake, 2011/07/25
- Re: How to do? Possible?, Linda Walsh, 2011/07/25
- Re: How to do? Possible?, Bob Proulx, 2011/07/25
- Re: How to do? Possible?, Dennis Williamson, 2011/07/25
- Re: How to do? Possible?, Bob Proulx, 2011/07/25