bug-bash
[Top][All Lists]
Advanced

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

Re: Variable scoping


From: Stephane Chazelas
Subject: Re: Variable scoping
Date: Sun, 27 Jul 2008 22:35:32 +0100
User-agent: Mutt/1.5.16 (2007-09-19)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]