[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Code block returning code results formatted as another type of c
From: |
Charles C. Berry |
Subject: |
Re: [O] Code block returning code results formatted as another type of code block? |
Date: |
Wed, 3 Feb 2016 21:03:59 -0800 |
User-agent: |
Alpine 2.20 (OSX 67 2015-01-07) |
On Wed, 3 Feb 2016, Brett Viren wrote:
Hi,
I have some shell command line program that spits out JSON. I want Org
execute that command from a source block (of type "sh") and have the
result displayed as another source block of type "json".
Try `:wrap src json':
#+BEGIN_SRC sh :exports both :results value code :wrap src json
echo '{"foo":"bar", "baz":"quax"}'
#+END_SRC
#+RESULTS:
#+BEGIN_src json
{"foo":"bar", "baz":"quax"}
#+END_src
HTH,
Chuck