[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua as replacement for Bash scripting
- From: Hisham <hisham.hm@...>
- Date: Fri, 16 Jul 2010 12:52:43 -0300
On Fri, Jul 16, 2010 at 7:51 AM, Alexander Gladysh <agladysh@gmail.com> wrote:
> On Tue, Jul 13, 2010 at 02:06, Alexander Gladysh <agladysh@gmail.com> wrote:
>
>> sh. gcc { o = file } (file..'.c") .I. grep 'error' .I. sort .out
>
> Um. So, any comments?
I found it too weird, especially if the goal of moving away from sh
scripting is to avoid gotchas caused by weird-and-magic syntax.
I've been playing a bit with the implementation here -- I basically
copied Penlight's path code and added some more command launchers
(sh.lines and sh.tokens, both return generators for "for"). I was in
the process of rewriting a large shell script I have but the process
is proving to be harder than I expected due to the amount of ugly
tricks caused by variable scoping I employed there. So I didn't get to
properly test much of the code I wrote, and therefore I ended up not
committing it yet.
for device, mountpoint, fstype in
fs.tokens.grep("-w","unionfs","/proc/mounts") do
-- ...
end
-- Hisham
- References:
- Lua as replacement for Bash scripting, Alexander Gladysh
- Re: Lua as replacement for Bash scripting, Jerome Vuarand
- Re: Lua as replacement for Bash scripting, Alexander Gladysh
- Re: Lua as replacement for Bash scripting, Jerome Vuarand
- Re: Lua as replacement for Bash scripting, Hisham
- Re: Lua as replacement for Bash scripting, Alexander Gladysh
- Re: Lua as replacement for Bash scripting, Florian Weimer
- Re: Lua as replacement for Bash scripting, Javier Guerra Giraldez
- Re: Lua as replacement for Bash scripting, Alexander Gladysh
- Re: Lua as replacement for Bash scripting, Hisham
- Re: Lua as replacement for Bash scripting, Alexander Gladysh
- Re: Lua as replacement for Bash scripting, Hisham
- Re: Lua as replacement for Bash scripting, Alexander Gladysh
- Re: Lua as replacement for Bash scripting, Alexander Gladysh
- Re: Lua as replacement for Bash scripting, Alexander Gladysh
- Re: Lua as replacement for Bash scripting, Alexander Gladysh
- Re: Lua as replacement for Bash scripting, Alexander Gladysh