piping output from external command
Hello, This used to work with pdftex: \starttext \input "\string|echo hello world" \stoptext What's the recommended way, to do this in mkiv? I've defined \Pipe{} like this: \startluacode userdata = userdata or {} function userdata.pipe(c) local h = io.popen(c) context(h:read"*a") h:close() end \stopluacode \def\Pipe#1{\ctxlua{userdata.pipe"#1"}} But I suppose that there is already a nice command in the core... ;) -- Peter
On 30-1-2011 11:19, Peter Münster wrote:
But I suppose that there is already a nice command in the core... ;)
os.resultof(...) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 30-1-2011 11:43, Peter Münster wrote:
Hans Hagen
writes: On 30-1-2011 11:19, Peter Münster wrote:
But I suppose that there is already a nice command in the core... ;)
os.resultof(...)
Thanks!
No tex-command...?
never needed it but there is \cldcontext{os.resultof("...")} if you want to save keystrokes
(not important, \ctxlua{context(os.resultof"...")} is ok)
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
pmlists@free.fr