emacs-orgmode
[Top][All Lists]
Advanced

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

bash source code block: problem after ssh commands


From: Alain . Cochard
Subject: bash source code block: problem after ssh commands
Date: Wed, 25 Oct 2023 13:17:42 +0200

Hello.

For me, 'C-c C-c' on the following group

   #+begin_src bash :results output
   echo "foo"
   echo "bar"
   #+end_src

works as I expect: 'foo' and 'bar' are echo'ed.  But it fails on this
one:

   #+begin_src bash :results output
   ssh cochard@fruc.u-strasbg.fr "echo foo>foo_file"
   echo "bar"
   #+end_src

The file 'foo_file' is created on the remote machine, but 'bar' is not
echo'ed.  I have tried to insert other commands between the ssh and
echo commands, or append semicolons at the end of the commands,
without success.

By contrast, it works with this one:

   #+begin_src bash :results output
   ssh cochard@fruc.u-strasbg.fr "echo foo>foo_file" ; echo "bar"
   #+end_src

Perhaps it is worth noting that I observe the same behavior if I
simply copy/yank the commands (I mean: the two commands yank'ed at
once) in an emacs terminal (obtained with 'M-x shell').  However,
everything works as I expect if I copy/yank the commands (all at once)
in a "regular" X terminal (xfce in my case).

I wish I could understand what is going on.

Thanks

-- 
EOST (École et Observatoire des Sciences de la Terre) 
ITE (Institut Terre & Environnement) | alain.cochard@unistra.fr
5 rue René Descartes   [bureau 110]  | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France     | [ slot available for rent ]




reply via email to

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