emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Phil Mason" <phil.mason@broadcom.com>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Shell script block gives no output when evaluated
Date: Wed, 8 Feb 2012 14:00:27 +0000	[thread overview]
Message-ID: <2D76BBD878DB8B49BBE309F15526B38EC2DE@SJEXCHMB06.corp.ad.broadcom.com> (raw)

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=1
       if [[ -n "$foo" ]]; then
           echo "foo has been defined (and has value $foo)"
       else
           echo "foo has not been defined"
       fi       
       if [[ -n "$bar" ]]; then
           echo "bar has been defined (and has value $bar)"
       else
           echo "bar has not been defined"
       fi       
     #+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 works as I expect (foo is defined, bar is not). Can anybody provide any clues about what I'm doing wrong.

Thanks in advance

Phil

             reply	other threads:[~2012-02-08 14:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-08 14:00 Phil Mason [this message]
2012-02-08 14:36 ` Shell script block gives no output when evaluated Eric Schulte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2D76BBD878DB8B49BBE309F15526B38EC2DE@SJEXCHMB06.corp.ad.broadcom.com \
    --to=phil.mason@broadcom.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).