emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Forget about "bash -c bash file.sh" (Re: bash source code block: pro


From: Matt
Subject: Re: Forget about "bash -c bash file.sh" (Re: bash source code block: problem after ssh commands)
Date: Sat, 18 Nov 2023 10:09:05 +0100
User-agent: Zoho Mail

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]