From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/65663 Path: news.gmane.org!not-for-mail From: pmlists@free.fr (Peter =?utf-8?Q?M=C3=BCnster?=) Newsgroups: gmane.comp.tex.context Subject: piping output from external command Date: Sun, 30 Jan 2011 23:19:00 +0100 Message-ID: <87vd16avcb.fsf@micropit.couberia.bzh> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1296425962 2964 80.91.229.12 (30 Jan 2011 22:19:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 30 Jan 2011 22:19:22 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Jan 30 23:19:18 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pjfc5-0000oB-Vu for gctc-ntg-context-518@m.gmane.org; Sun, 30 Jan 2011 23:19:18 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5FC41CA977; Sun, 30 Jan 2011 23:19:17 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id wHaOzb8MsCCf; Sun, 30 Jan 2011 23:19:17 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A9CBACA94E; Sun, 30 Jan 2011 23:19:14 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A1744CA94E for ; Sun, 30 Jan 2011 23:19:13 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id IoNISzSWsZ9m for ; Sun, 30 Jan 2011 23:19:02 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 8BB50CA94A for ; Sun, 30 Jan 2011 23:19:02 +0100 (CET) Original-Received: from smtp.smtpout.orange.fr (smtp05.smtpout.orange.fr [80.12.242.127]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p0UMJ1ro016527 for ; Sun, 30 Jan 2011 23:19:02 +0100 Original-Received: from micropit.couberia.bzh ([81.48.159.127]) by mwinf5d10 with ME id 1yK01g0072lCgqR03yK0Eu; Sun, 30 Jan 2011 23:19:01 +0100 Original-Received: by micropit.couberia.bzh (Postfix, from userid 1000) id 2FB04160739; Sun, 30 Jan 2011 23:19:00 +0100 (CET) User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=80.12.242.127; country=FR; latitude=46.0000; longitude=2.0000; http://maps.google.com/maps?q=46.0000,2.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 05E1Wj1cw - bc2133e97b79 - 20110130 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.216 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:65663 Archived-At: 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 ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________