[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua as replacement for Bash scripting
- From: Alexander Gladysh <agladysh@...>
- Date: Tue, 6 Jul 2010 12:37:24 +0400
On Mon, Jul 5, 2010 at 15:55, Vyacheslav Egorov <mister.aleph@gmail.com> wrote:
> When I was writing utility scripts in Lua I quickly became annoyed by lack
> of variable expansion mechanism.
> So the first thing I introduced was a function expand which (just as it name
> suggests) expanded $-prefixed variables inside given string. It relied on
> debug functions to look for variables inside caller frame.
Is it much different from the code here?
http://lua-users.org/wiki/StringInterpolation (see "Hack: Using debug
to Access Lexicals" section).
If so, can you share the code? :-)
Alexander.