From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: Redirecting stderr to stdout with babel/shell Date: Thu, 1 Jan 2015 17:27:14 +0100 Message-ID: <2015-01-01T17-23-41@devnull.Karl-Voit.at> Reply-To: Karl Voit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6idU-0002UR-JT for emacs-orgmode@gnu.org; Thu, 01 Jan 2015 11:30:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y6idR-0006ii-F2 for emacs-orgmode@gnu.org; Thu, 01 Jan 2015 11:30:08 -0500 Received: from plane.gmane.org ([80.91.229.3]:34738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y6idR-0006gm-8l for emacs-orgmode@gnu.org; Thu, 01 Jan 2015 11:30:05 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Y6idP-0006WT-O2 for emacs-orgmode@gnu.org; Thu, 01 Jan 2015 17:30:03 +0100 Received: from friends.grml.info ([136.243.234.19]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 01 Jan 2015 17:30:03 +0100 Received: from news1142 by friends.grml.info with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 01 Jan 2015 17:30:03 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi! I enjoyed [1] where John is describing the issue of vanishing stderr-messages through babel. This could be fixed by "(setq org-babel-python-command "python -i -c \"import sys; sys.stderr = sys.stdout\"")". Is there a similar method to re-direct the stderr of a shell script to stdout as well? The issue is demonstrated below: #+BEGIN_SRC sh :results output echo "testing stdout" >&1 echo "testing stderr" >&2 echo "testing stderr with manual redirect" 2>&1 >&2 #+END_SRC #+RESULTS: : testing stdout : testing stderr with manual redirect I want to skip the manual redirect after each command. Thanks for any idea! [1] http://kitchingroup.cheme.cmu.edu/blog/2014/12/21/Capturing-stderr-from-Python-in-org-mode-take-2/ -- mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: > get Memacs from https://github.com/novoid/Memacs < https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github