[TH] zła kolejno

Andrzej Krzysztofowicz ankry at green.mif.pg.gda.pl
Sat Sep 29 08:53:41 CEST 2007


Arkadiusz Patyk wrote:
[...]
> %post -p <lua>
> t = {};
> f = io.open("/etc/shells", "r")
> if f then
>    for l in f:lines() do  t[l]=l; end
>    f:close()
> end
> for _, s in ipairs({"/bin/ksh", "/bin/sh"}) do
>    if not t[s] then
>       f = io.open("/etc/shells", "a"); f:write(s.."\n"); f:close();
>    end
> end
> 
> (to mój pierwszy skrypt w LUA ;-) )

Komitnij, to bedzie pierwszy w PLD :)

-- 
=======================================================================
  Andrzej M. Krzysztofowicz                  ankry at mif.pg.gda.pl
  phone (48)(58) 347 19 36
Faculty of Applied Phys. & Math.,   Gdansk University of Technology



More information about the pld-devel-pl mailing list