emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Scripting with org-mode


From: briangpowell .
Subject: Re: [O] Scripting with org-mode
Date: Mon, 30 Nov 2015 13:48:30 -0500

* Assuming that entire file is made up of shell commands (like the ones in the example you gave) since, in such a case as your example the "#" in the first column would ignore the rest of the lines as comments:

M<
Mx set-mark
M>
Mx shell-command-on-region 

On Mon, Nov 30, 2015 at 11:43 AM, Shakthi Kannan <address@hidden> wrote:
Hi,

Is there a way to execute all the org-mode code blocks in a file, and
send the output to stdout?

For example, I have the following org file:

=== BEGIN ===

* Greeting

#+BEGIN_SRC sh :results output
  echo "Hello $USER! Today is `date`"
#+END_SRC

* Current directory

#+BEGIN_SRC sh :results output
  pwd
#+END_SRC

=== END ===

I could go to each code block, and type C-c C-c to produce an output.
But, I just want to be able to execute the entire file, and produce
one single output.

Is this possible?

SK

--
Shakthi Kannan
http://www.shakthimaan.com



reply via email to

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