From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/111009 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: a.rosenstock@web.de Newsgroups: gmane.comp.tex.context Subject: Re: Running a couple of context statements in a linux bash shell heredocument? Date: Thu, 1 Apr 2021 19:15:22 +0200 Message-ID: References: <018a720ba8a409ef4defd8b2df88e6a1e5e9a448.camel@henrimenke.de> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6397211753495255549==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27370"; mail-complaints-to="usenet@ciao.gmane.io" To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 01 19:15:43 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lS0v0-0006ze-Dx for gctc-ntg-context-518@m.gmane-mx.org; Thu, 01 Apr 2021 19:15:42 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2AB2F28211B; Thu, 1 Apr 2021 19:15:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ax7rqqwD1PTO; Thu, 1 Apr 2021 19:15:26 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 39A8528211F; Thu, 1 Apr 2021 19:15:26 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7409C28211B for ; Thu, 1 Apr 2021 19:15:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QxqptzKg9Y8C for ; Thu, 1 Apr 2021 19:15:23 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=212.227.15.14; helo=mout.web.de; envelope-from=a.rosenstock@web.de; receiver= Original-Received: from mout.web.de (mout.web.de [212.227.15.14]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 6DCCE28210D for ; Thu, 1 Apr 2021 19:15:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1617297323; bh=EGik7i7oZiUnahR5KIGwLMZ4EDJLCWPeeVe+FIphy2c=; h=X-UI-Sender-Class:From:To:Subject:Date:In-Reply-To:References; b=Zt9ahXjzIaKpeg8YEMFmOdSLPHUCTUiLuC8uMno2m1dKTocvZKLipZ7EipNwYt3+G +qiqmCrQFEtFp/LIhjx9fodEbempctjEUCoVD/JEWbFTOcJko18byZW/3FHD1vcitw Pleh4xlX5gPw501z+Yghg1Bf3X74tnhz1fPO28ao= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from [217.250.161.71] ([217.250.161.71]) by web-mail.web.de (3c-app-webde-bs16.server.lan [172.19.170.16]) (via HTTP); Thu, 1 Apr 2021 19:15:22 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:3uRgueDHIdlrstiHtWsDpkfT7AvItGDMkFlYMjEQJOzx3Mwz4pW0UpbLCJsEPIiO58+fI aFKmT2XHGtV1Xhw7TkM92a/tzCaemJ1KL2+v69XBzs6Szih1yfYL6sNJ/LgkhTIanl/Qi6zuAZDz sb30CAD7g4GqupoXa2UzyOX3PeOPeZVex9CxYQ2zr849wMZaa6asIe41Js1DYUenpLrGUnsSwT3V XqV/klk42Hvi7x9AwauqhpZkCvichR7M6V23MoeNdsfUWACaai33kQ58VIxP486aKev7COSE2W4M Mo= X-UI-Out-Filterresults: notjunk:1;V03:K0:/aISfwDHOxA=:RV/+4qt9oDW7f2I2iZtLUJ EmJDNB1l3bqXnBFVm2qO2ZfqMm/ViR29f5kpBtkSssBfm7mTURCE/ROyZaHeZUY+dNg7NjHYu gSjFnuEL5Hpqr8/lJtbUdoktYTX1Pdq4xjA+Fa4SgT+ssYfCW74IQO/O5cb6uckIQCCd3WOnb ceR9Nod4uBq2oJL1sHhBQvHGiSVuEm4bvvk1AgMnz/e/Qa/5x5Ai7VpjCwgLzkBmXKQxXpLnk 7mGUDHz+4OTgHoQ0AkugECddedy95v9YlbL+FrXxltk+V66EUnHQTLp0DSRaJTu1Y6l6ozl0r J1hbpIILeCht7FG6GllGRsBQLp9NJVGlNBWj8wZFNonDAE9DdYT5byuKcdlQrEntfg+Cp10MQ 1juq+Uvt2HMDKce7LQ3xht1yqNXmCSIViWO9mKFYQKDaIqTTAwuF+UJIpFBcNROxlGM74Soa5 ctWrQ7D1wu54csYWF0fDAMpgCOpTZpCb3bS6J3HV6+21oEw9t6uV7ta5nFgf9ROprY0hipqnT grAjkVi90bkmnObS6x2DvOSSX/GYDXc75WCo6UommvBy2z9Nj0HEtzQ3yfVhVNv7yHGeB+pil K9NjQnJoUH915q4GT5SvgoT8UHmo+HQEe1c92ritiW1r6ua2jhgDIkgW3cgAIiCHXG9KOauPp fX3vLGBOUF3I13At3rju9ODf3Zqd68eG26JErcXTGuOhMfVyl1shti1u/hlxb6OIchhj63tDn IDYIkjbjhDq1LxNlOoTC4KbyT7utxOEdvo6uHX/eS/X1xiSfQZz626LNuZD5LvK+49/WRBbh X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:111009 Archived-At: --===============6397211753495255549== Content-Type: text/html; charset=UTF-8
Thank you, Henri and Aditya! With the "-pipe" I get it to work, too. And the last line of my shellscript - "mv cont-new.pdf my-file.pdf", "my-file" given as a position parameter, I've got my output name ...
 
Cheers, Alexander
 
 
Gesendet: Donnerstag, 01. April 2021 um 18:22 Uhr
Von: "Aditya Mahajan" <adityam@umich.edu>
An: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Betreff: Re: [NTG-context] Running a couple of context statements in a linux bash shell heredocument?
On Thu, 1 Apr 2021, Henri Menke wrote:

> On Thu, 2021-04-01 at 16:23 +0200, Alexander Rosenstock wrote:
> > Hi all,
> >
> > is it possible running a couple of context statements as a
> > heredocument integrated in a - for example linux bash - shellscript?
> > Do you have any experience or idea or alternative solution?
> >
>
> This will work, but only if file_that_does_not_exist (possibly with
> additional file extensions) does not exist:
>
> $ cat <<'EOF' | context file_that_does_not_exist
> \starttext
> Hello world!
> \stoptext
> EOF

I couldn't get that to work but this works ...

$cat <<'EOF' | context --pipe
\starttext
Hello world!
\stoptext
EOF

Generates a file called cont-new.pdf. I could not change it using --result or --jobname.

Aditya

___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
--===============6397211753495255549== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============6397211753495255549==--