emacs-orgmode
[Top][All Lists]
Advanced

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

Re: How to intersperse commands with their output in RESULTS block?


From: Fraga, Eric
Subject: Re: How to intersperse commands with their output in RESULTS block?
Date: Thu, 6 Feb 2020 06:55:03 +0000

On Wednesday,  5 Feb 2020 at 18:25, Diego Zamboni wrote:
> tl;dr: is there a way to have ob-shell (or some similar mode) run commands
> one by one and include the commands, interspersed with their output, in the
> #+RESULTS block?

You haven't said on what type of system but, if Linux, you could try
using =script= as a starting point:

#+begin_src shell :results output
  script <<EOF
  ls
  echo 'hello'
  EOF
#+end_src

You may wish to have a second shell script that massages the output in
the =typescript= file and ouputs that instead, e.g. to filter the
carriage returns.
-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.2-233-gc2bc48



reply via email to

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