lua-users home
lua-l archive

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

On Thu, Nov 17, 2011 at 10:52 AM, steve donovan
<> wrote:
> On Thu, Nov 17, 2011 at 11:20 AM, Natanael Copa <> wrote:
>> Since this means we will replace lots of shell scripts with lua, are
>> there any lua modules for typical shell things? like mv, cp, ps, kill
>> etc.
> Sounds like a fantastic idea and well-worth supporting!
> It's possible to get more natural notation with shell commands:

Yeah, definitively something in this direction - but this does forks.
I want avoid forks.

> I _distinctly_ remember that Hisham and a few others were getting
> excited about a 'lua shell' library which would support pipelines and
> the like, but I can't find the reference.

I also have a vauge memory about a similar discussion and also could
not find the reference.

pipelines.. hum... i wonder if it would be possible/desireable to pass
over iterators and/or callbacks to provide simlar functionallity as
pipes. We are here talking about lua functions that pass data over to
other lua function rather than a process passing over data to other


sh.find({ name = "*.lua" }, function(path)
   print("luafile found:", path)


for path in sh.find{name = "*.lua"} do
  print("Lua file found:", path)

> Otherwise, I imagine that luaposix will get you most of the way.

luaposix gives the stuff you find with 'man 3' . I'm currently looking
for the posix stuff you find in 'man 1'. This stuff is probably best
implemented in lua, (with luaposix as backend?)

The stuff here:

Natanael Copa