lua-users home
lua-l archive

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

On Fri, Jun 1, 2012 at 10:05 AM, Sandeep Ghai <> wrote:
> I searched internet but didnt find anything relevant.
> Any help would be appreciated.

No _direct_ way to do this, but you can always use os.execute for
shell commands (works like C's system)

local tmpfile = os.tmpname()
os.execute("ls -1 > "..tmpfile)
... can now open tmpfile

for this it's easier to use io.popen

local f = io.popen("ls - 1")
for line in f:lines() do

steve d.