emacs-orgmode
[Top][All Lists]
Advanced

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

[O] Shell script block gives no output when evaluated


From: Phil Mason
Subject: [O] Shell script block gives no output when evaluated
Date: Wed, 8 Feb 2012 14:00:27 +0000

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 via email to

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