emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Redirecting stderr to stdout with babel/shell


From: Achim Gratz
Subject: Re: [O] Redirecting stderr to stdout with babel/shell
Date: Sun, 11 Jan 2015 12:43:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Karl Voit writes:
> echo "testing stderr with manual redirect" 2>&1 >&2

The last redirection ">&2" is nonsense, it only works because STDERR is
already reopened on STDOUT and redirection to the same file descriptor
is ignored.

And to solve your original problem:

#+BEGIN_SRC sh :results output
exec 2>&1
echo "testing stdout" >&1
echo "testing stderr" >&2
date -g
:
#+END_SRC


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




reply via email to

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