From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Phil Mason" Subject: Shell script block gives no output when evaluated Date: Wed, 8 Feb 2012 14:00:27 +0000 Message-ID: <2D76BBD878DB8B49BBE309F15526B38EC2DE@SJEXCHMB06.corp.ad.broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rv85J-0003BV-7T for emacs-orgmode@gnu.org; Wed, 08 Feb 2012 09:01:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rv856-0006OU-Vd for emacs-orgmode@gnu.org; Wed, 08 Feb 2012 09:01:21 -0500 Received: from mms3.broadcom.com ([216.31.210.19]:3668) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rv856-0006Np-HG for emacs-orgmode@gnu.org; Wed, 08 Feb 2012 09:01:08 -0500 Content-Language: en-US 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" Hello all, If I evaluate the following source block in emacs 23.1.1, org mode v7.8.03 = it reports that it produces no output: #+begin_src sh :results replace foo=3D1 if [[ -n "$foo" ]]; then echo "foo has been defined (and has value $foo)" else echo "foo has not been defined" fi =20 if [[ -n "$bar" ]]; then echo "bar has been defined (and has value $bar)" else echo "bar has not been defined" fi =20 #+end_src Confusingly if I remove either if block then the results for the remaining = one is correct and if I run the same code from within an actual script it w= orks as I expect (foo is defined, bar is not). Can anybody provide any clue= s about what I'm doing wrong. Thanks in advance Phil