[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Init system in Lua
- From: Natanael Copa <natanael.copa@...>
- Date: Thu, 17 Nov 2011 11:46:57 +0100
sorry for answering myself.
On Thu, Nov 17, 2011 at 11:29 AM, Natanael Copa <natanael.copa@gmail.com> wrote:
> On Thu, Nov 17, 2011 at 10:52 AM, steve donovan
> <steve.j.donovan@gmail.com> wrote:
>> 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:
> http://pubs.opengroup.org/onlinepubs/9699919799/idx/utilities.html
I went throught the list from link above. Lots is not interesting at
all (like pax...). Other of the stuff could be used directly from
luaposix (basename, cwd, chdir etc) and many of them could be
implemented together with a 'find' function (a directory recurser).
That would solve the 'chmod -R' kind of stuff.
so i think what would be nice is some lua functions for those:
cat
cmp
cp
cut
dd
df
du
file
find
fuser
grep
head
id
kill
ls?
mv
ps
sort?
tail
touch
uniq
Many of those are fairly trivial to implement. Some others could go
into separate lua modules (lua-procps with ps/kill/free/sysctl?) file
could be a lua binding to libmagic?
So I think it is a convenience lib with the basic stuff like cp/mv
that is mostly needed.
--
Natanael Copa