From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id GB+tOWV/WGW5iAAA9RJhRA:P1 (envelope-from ) for ; Sat, 18 Nov 2023 10:09:58 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GB+tOWV/WGW5iAAA9RJhRA (envelope-from ) for ; Sat, 18 Nov 2023 10:09: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 CE51D43BB3 for ; Sat, 18 Nov 2023 10:09:57 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=JW3N49YT; dmarc=none; arc=pass ("zohomail.com:s=zohoarc:i=1"); 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" ARC-Seal: i=2; s=key1; d=yhetil.org; t=1700298597; a=rsa-sha256; cv=pass; b=R7P0pXjJ2adUGy7Pum6JS3H/rGFStzyE8gvyArFkrm0kTbZrm0E3dIKU7h3WSrYYYFKsjo 0soxWTTrTbH20B5SuBEWnTSB9/qVqWSJ2yWTzVAbDGQzK3AQ40eZP0zCmADsCkTEr46B6a QpD7vRadNEcO4/MpBgzvHfyKNk5mDqoRkf8V5UlWf6/kUSwGrnOBCpfKaErUJ/FLdbH73S rHmaXNe79yDhDyF9O1FylHeKVjdYtbnxyth+uhCCRoyw1hPBIOQlq56gpoaWunacIW25DF XpC1xMKmlo9kf3DEVcOhh1ZpNuv5DzVT6Wf+hPk0mlNcB3ZOR9Eh/zkQhHHvqA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1700298597; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=n6CfcsjxpQMTgYmgedFUhvnph5pd6PVCIqhxXA3hf7o=; b=agAQ9lfL2KCkt8F4Jb9EeOpq4A+V9GJn9qXpUDuytP/NBQgQ+MImVA+LwAXIdiHD5zfKK2 ptb1LUdUwa3/2jdC+12XucujpVpNNXHVQ277H0Sayz6vhzdAbw/ZauyNKAeHFISlIKMx1D yoG+rHxktJMJ3wiKVvevPymU0qIFZnQXahIMJdcVXTz0rLGHrg7b72Z8AtniIluzOQY4rs 3yUbIP6jy6AjEnCCUTFHlAwpvTxYvPqPKpim0IxWtZD2pZK0+sWOPWmjyhMIwKOxM/kH6t G0Mct0tIvMjA7jV4o3mFIo06ZcbEC6NH2PWEoOmy1DiTA8tNp5pdPPMsWRQQ+A== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=excalamus.com header.s=zmail header.b=JW3N49YT; dmarc=none; arc=pass ("zohomail.com:s=zohoarc:i=1"); 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r4HKD-0005pz-S1; Sat, 18 Nov 2023 04:09:13 -0500 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 1r4HKB-0005pp-Cm for emacs-orgmode@gnu.org; Sat, 18 Nov 2023 04:09:11 -0500 Received: from sender4-op-o15.zoho.com ([136.143.188.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r4HK9-0005Pa-OE for emacs-orgmode@gnu.org; Sat, 18 Nov 2023 04:09:11 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1700298547; cv=none; d=zohomail.com; s=zohoarc; b=ZKSoLti6WbIvK3lj58M8C+2bFNq1YVJHIi5daI1hbxLrVO9C16horcBPNsqMJvk4q70vCjnxXfknG208erzTwnCdBVSAoUug2W4LwD7yNewQZPOSjT7e6sAqZU6YNpc0ov+P5KePs6CELHf+MkXT1r3JcwW9M2O0RtDTAZGAYSU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700298547; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=n6CfcsjxpQMTgYmgedFUhvnph5pd6PVCIqhxXA3hf7o=; b=Fem7tpRW3otZCqf8PFdlrqynDDgGA7XcoaehWmlqpqHcIq+i2Ge8S3fLzEtOYhgXDiVOSlbJOREuSNFMVrhOWHKU0GqttMvA26iAZI1/cwfibcFhyMSJUaX6zwFs6qwDgrM7jO15aBTPJdmTZTUy3BL9jJ95xryk37qGUWS1sD8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=excalamus.com; spf=pass smtp.mailfrom=matt@excalamus.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1700298547; s=zmail; d=excalamus.com; i=matt@excalamus.com; h=Date:Date:From:From:To:To:Cc:Cc:Message-ID:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=n6CfcsjxpQMTgYmgedFUhvnph5pd6PVCIqhxXA3hf7o=; b=JW3N49YTaSTRRZXp/G00fNaITglhIG8wi63MYs8jqh4XCLIEY796aYx7ybe/YtNk CpkCru2r+n9R+aFBxuuSvy8HWxr8b6Xdn1FUqt5xLv0cEdE/wrYoFscfkhwPpZfYFhD NIqTYtX84UNcbFwKjYfG5m+/UTpZUmoOP1b6yGI4= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1700298545244520.1838551499959; Sat, 18 Nov 2023 01:09:05 -0800 (PST) Date: Sat, 18 Nov 2023 10:09:05 +0100 From: Matt To: "Bruno Barbier" Cc: "emacs-orgmode" Message-ID: <18be1b0d843.da91946a3377707.4682124012173504521@excalamus.com> In-Reply-To: <65587bd8.050a0220.b1cf7.4544@mx.google.com> References: <25912.63830.726070.953843@gargle.gargle.HOWL> <87fs1xbis1.fsf@localhost> <25916.238.191509.652552@gargle.gargle.HOWL> <653f8a93.050a0220.f2202.5816@mx.google.com> <87zfzr2ejj.fsf@localhost> <18ba5e231e3.f989cde147196.3154436412643995109@excalamus.com> <875y2e2b9y.fsf@localhost> <18bb07473e2.1007b1565819307.6938164403009000496@excalamus.com> <877cmr2ke4.fsf@localhost> <18bb5337346.dfcd5ebb1139895.801408740607633332@excalamus.com> <18bd3d38ff3.115b786cb2560022.7704006411630399228@excalamus.com> <87fs169h7f.fsf@localhost> <18bd984270d.1048050a22954105.2819987720224062869@excalamus.com> <25942.29051.701153.391260@gargle.gargle.HOWL> <18bd9ea2f7b.b77346232985684.5614027527324280790@excalamus.com> <871qcod9ad.fsf@localhost> <18bdf538f2f.126bad4763316098.8581777358227217138@excalamus.com> <18be17bf975.d175a3ef3371770.6719662597118588806@excalamus.com> <65587606.050a0220.53c59.4864@mx.google.com> <18be199b332.dc8678323375095.5527629479819727464@excalamus.com> <65587bd8.050a0220.b1cf7.4544@mx.google.com> Subject: Re: Forget about "bash -c bash file.sh" (Re: bash source code block: problem after ssh commands) MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Received-SPF: pass client-ip=136.143.188.15; envelope-from=matt@excalamus.com; helo=sender4-op-o15.zoho.com 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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -9.51 X-Migadu-Queue-Id: CE51D43BB3 X-Migadu-Spam-Score: -9.51 X-TUID: rD/av7x6a2A7 ---- On Sat, 18 Nov 2023 09:54:46 +0100 Bruno Barbier > But, you're right. To be safe, from now on, I'll use: > > cat /tmp/test.sh | bash -c bash It's still not clear to me if this is "what Emacs does". However, that's the best I could come up with. Evaluating the following #+name: /tmp/test.sh #+begin_src bash :results output ssh localhost "echo foo>foo_file" echo "bar" | tee /tmp/bar.txt #+end_src does exactly what cat /tmp/test.sh | bash -c bash does. Both create a file "foo_file" containing "foo" on the remote machine and neither execute the second line. So, I would say that what happens in Org is the "expected" behavior.