[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: Wed, 7 Jul 2010 12:58:59 +0400
On Wed, Jul 7, 2010 at 06:47, David Manura <dm.lua@math2.org> wrote:
> On Tue, Jul 6, 2010 at 8:52 PM, Hisham <hisham.hm@gmail.com> wrote:
>> ...given that io.popen can only do reading or writing but not both...
<...>
> I don't see the benefit of `pipe.ls("/dev").grep("^sd.*")` compared to
> `exec "ls /dev | grep ^sg.*". This reminds me of some wrappers around
> SQL that add a layer of bloat.
But what if you want to insert some Lua code in between? Granted, you
may code a separate Lua program — but in Bash you don't have to do
this.
-exec "ls /dev" (function(input) <do something and echo results>
end) "grep ^sg.*"
Alexander.