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

Re: exported shell variables and scope



On Wed, Jul 25, 2001 at 09:48:36AM -0400, Dale Scheetz wrote:
> I've had a problem with this issue for a long time now, and have never
> been able to properly resolve the issue. I am not able to get a broad
> enough scope to shell defined variables.
> 
> Simple process: one shell script defines a bunch of variables and the next
> shell script uses them to perform the work.

When the script exits, all the changes vanish also. To do the change in the
current shell, you need to "source" the script rather than execute it.

HTH,
-- 
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
- Every night you must rediscover the secret to sleep, 
- only to forget it moments later...



Reply to: