[prev in list] [next in list] [prev in thread] [next in thread]
List: bash-bug
Subject: Re: Variable scoping
From: Stephane Chazelas <Stephane_Chazelas () yahoo ! fr>
Date: 2008-07-27 21:35:32
Message-ID: 20080727213530.GA13505 () sc ! homeunix ! net
[Download RAW message or body]
On Fri, Jul 25, 2008 at 08:58:21AM +0300, Pierre Gaston wrote:
[...]
> With "sh" (a posix shell) no
> In bash you can use the builtin "local" (or declare).
[...]
See http://stchaz.free.fr/locvar.sh for one way to implement
local scope in a POSIX script.
(those functions have not been thoroughly tested, they were just
written as a proof of concept, but you get the idea).
--
Stéphane
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic