---- 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.