[NTG-context] Read output of external command

2013-04-14 Thread Marco Patzer
Hi, I need to read the standard output of an external command. This is what I came up with: \starttext \startluacode f = io.popen ls context(f:read *a) \stopluacode \stoptext It works with luajittex, plain lua5.1 and lua5.2, but it fails with a current luatex: ! LuaTeX error

Re: [NTG-context] Read output of external command

2013-04-14 Thread Hans Hagen
On 4/14/2013 12:06 PM, Marco Patzer wrote: Hi, I need to read the standard output of an external command. This is what I came up with: \starttext \startluacode f = io.popen ls context(f:read *a) \stopluacode \stoptext context(os.resultof(ls)) It works with luajittex, plain