emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] sh - script: how to control the output.


From: Johann Spies
Subject: Re: [O] sh - script: how to control the output.
Date: Mon, 2 Nov 2015 15:00:45 +0200



You could try out some of the options for the ":results" header
argument, as described here:

http://orgmode.org/manual/results.html#results



Thanks Myles.  After a bit of experimenting I got this to work (I have to remove the *example*  lines to make a table of the output.  But that is OK.
 

#+BEGIN_SRC sh :results verbatim
#!/bin/sh
echo "\d wos.za_wos_subject_percent_v" | psql -h localhost -p 63334 book_citation | sed '1,2d' | \
sed '/[|+]/s/^/|/'| sed -e '/[|+]/s/$/|/'

#+END_SRC

#+results:
#+begin_example
 View "wos.za_wos_subject_percent_v"
|    Column     |  Type   | Modifiers |
|---------------+---------+-----------|
| id            | integer | |
| subject       | citext  | |
| pubyear       | integer | |
| sa_papers     | numeric | |
| world_papers  | bigint  | |
| za_percentage | real    | |
| rest          | real    | |

#+end_example

Regards
Johann

--
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)

reply via email to

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