From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id UPMZOYpwY2N0HAAAbAwnHQ (envelope-from ) for ; Thu, 03 Nov 2022 08:40:58 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SOIjOYpwY2OdoAAA9RJhRA (envelope-from ) for ; Thu, 03 Nov 2022 08:40:58 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AE33238761 for ; Thu, 3 Nov 2022 08:40:58 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqUq0-0006Gg-T7; Thu, 03 Nov 2022 03:40:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqUq0-0006GI-2l for emacs-orgmode@gnu.org; Thu, 03 Nov 2022 03:40:32 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqUpv-0002QP-Dv for emacs-orgmode@gnu.org; Thu, 03 Nov 2022 03:40:31 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 35788240105 for ; Thu, 3 Nov 2022 08:40:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667461226; bh=WovQPCTQqkhbmMbdTzKTGQbIkR3UvLqw1L7skKWbAX4=; h=From:To:Cc:Subject:Date:From; b=Fpw36a60RjWS52DiHsib5B8Ma/pxFDdd1svmsTzd+0V8AnBZIdTZgJ5HV1cg46C+R gMotNsSKWJ8KE0lX9BG2VMTT2Owyce5y6M13GhO8eODFdS2l0bNQUK+3zej4lqJpnI 7rzjuJgR4RhQmRJfesjqX2zx3cVDpMe92pXvl4CKfGtTmEouNv/pwLj1Tu6aodN6Fl f6gshX4bO516ZNU/CS5dTLv3QHQf0yeWbsNQ9ujvC0L8Ulu0duAMgxiCbRX78acisT 5w8guh1eZQKsFhkMoWCXRo36TMC9oYFEO4jXl90DSc0+qF6wOOqSh2fcaiLxBl0t8A ZzOCX/8GxMZjg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N2wdy2gZCz6tmc; Thu, 3 Nov 2022 08:40:21 +0100 (CET) From: Ihor Radchenko To: Greg Minshall Cc: orgmode Subject: Re: processing a literal example line by line in a shell source block? In-Reply-To: <122789.1667413045@archlinux> References: <122789.1667413045@archlinux> Date: Thu, 03 Nov 2022 07:41:03 +0000 Message-ID: <875yfw7aeo.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667461258; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=DlkutAPQFslotvdmNspM8U6r7TwLBqTNxw1BYkARieg=; b=Tfw7AZL/pNw9wke/G+ovPiebw8bwqKKoj8yFWhE+BLAnwMG/OMjaWp/eaO+6AMcVHVgjCE nu6pPVr/m+GbDV3MouHYcz37xugX8EKcIaqyGERlVEFxMmMBcWvJMAgsvkhryEyRL98K58 LUBla6/3guYKrieRdjTHqU5Ixjg0aeL8QjTjchaTW/r4AJpI/u91RAlYyZUe99paldr2ZT XfdcujBikB5JCEIngaA3PsUr5Ejp8S3chdRWbmeiinrbECvqDYPTIbHJ1LnmGXTeub1D+T 1umUl0zlc2IBEVApu03xjYyRCDRJzf684bmHQ/YZr+cml1ojnJe3QUFhH0eySg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667461258; a=rsa-sha256; cv=none; b=aLjKgkO/rv+cgSALnwqo0Xtq+XdNBK8I1FyBrL9WQQHuUmnNHShknFfjdMR9sZUNMTPPn1 6n3RtLGRjk2OVMySqY8lrD2SCVqVP57itM7NSRSRjysnBfrPgYHZILR3xGT4crODBG5sDr NvPqK/Z8Jv2VrAKYHmnoC0xUNnoAOH0Sr34K1fN8hvmIbCypQjzMtn0o8hfgYHdbLvscZP kzHRE/pmnQKdDdMVML0kn9Adt/i30bhIWfkPiP/7GNY+V3MtsC00A+P0GNaO7xbDK25cUT c+aHkFSKgaNyL0WQr5Ev5FwQ7C4tYajswzCUbgOTqZJ7/vuCNlOoo0FVa0ohmQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Fpw36a60; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.49 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Fpw36a60; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: AE33238761 X-Spam-Score: -2.49 X-Migadu-Scanner: scn1.migadu.com X-TUID: 1YdlS88qzZWv Greg Minshall writes: > hi. i have a text in a named #+begin_example ... #+end_example block. > i would like to process this text line by line in a shell (bash, say) > code block. but, it appears that the individual lines are not > separated, but passed as one long string to the source block. (example > below.) > > is there a magic incantation i can use to accomplish this? Try #+name: lbl #+begin_example line 1 line 2 #+end_example #+begin_src bash :var input=lbl :results output echo "${input}" #+end_src #+RESULTS[719e61ee2f3fb87459530cf75b7bbef74b7d4337]: : line 1 : line 2 -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at