Andras Major <andras.g.ma...@gmail.com> writes:

> Hello, here is an example of apparently erroneous behaviour of the
> :results switch.  In this example, we use an sh block, but it also
> appears to affect other languages (will need more investigation).
>
> Example Org code:
>
> #+begin_src sh :exports output
>   echo "Hello World 1"
> #+end_src
>
> #+results:
> : Hello World 1
>
> #+begin_src sh :exports value
>   echo "Hello World 2"
> #+end_src
>
> #+results:
> : Hello World 2
>
> Am I missing something here or should the second instance really
> output something like an integer exit value from echo?
>

Hi András,

If we did return the value of shell scripts then ":results value" would
almost always simply return 0 (or possibly an error message).  For this
reason shell code blocks do not implement value returns, but rather will
always collect results from STDOUT.

Best -- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

Reply via email to