[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Creating hline in table from source block?
From: |
Achim Gratz |
Subject: |
Re: [O] Creating hline in table from source block? |
Date: |
Mon, 25 Nov 2013 21:13:57 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Loris Bennett writes:
> How do I get this
>
> #+RESULTS:
> | a | b | c | d |
> |-----+---+---+---|
> | 1 | 2 | 3 | 4 |
> | 5 | 6 | 7 | 8 |
You really don't want to use a shell for that, but if you insist, this
would do it:
--8<---------------cut here---------------start------------->8---
#+BEGIN_SRC sh :results raw
exec 3>&1 >&-
(
echo "a b c d"
echo ""
echo "1 2 3 4"
echo "5 6 7 8"
) | sed -re 's/^| /|/g' -e 's/^\|$/|-/' >&3
#+END_SRC
--8<---------------cut here---------------end--------------->8---
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra