0

I want to archive a config file in my org document:

#+BEGIN_SRC sh :dir /ssh:jetpac@server:  :var CONFIG="efile" :exports 
both :eval query :results output scalar raw
cat /builds/$CONFIG
#+END_SRC


#+RESULTS:
if [[ -z $BUILD ]]; then BUILD=0; fi

This works nicely, code gets evaluated, config file brought over into the results block. However, when trying to export, the RESULTS block is being evaluated by org and the '[[' condition tricks it to evaluate it as an invalid ORG link. Is there a way how to disable this behaviour for the results block? I have spent good deal of time reading docs and googling, no luck so far.

Thanks!

1

The +BEGIN_SRC has the ':no-expand' switch, which does exactly what I was looking for and that I have originally overlooked.

The following works:

#+BEGIN_SRC sh :dir /ssh:jetpac@server:  :var CONFIG="efile":exports both :results value verbatim code :no-expand
cat /builds/$CONFIG
#+END_SRC


#+RESULTS:
#+begin_example
if [[ -z $BUILD ]]; then BUILD=0; fi
#+end_example

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.