I'm writing a lot of manuals on how to accomplish things in bash. Often I'm showing people something that doesn't work, and then go on to show what works. When I'm showing something that doesn't work, the bash exit code is non-zero, and the result isn't captured by org. So as a general rule I just add "|| true" to most bash statements. But this is a bit ugly, is there a better way? so that after I do "org-publish" to html, my blog post is not littered with "|| true"
# -*- org-export-babel-evaluate: nil -*-
#+PROPERTY: header-args:sh :prologue exec 2>&1 :epilogue :
#+BEGIN_SRC sh :exports both :dir /ssh:ubuntu@54.1.2.3:~/theSearch/
bundle exec rails server || true
#+END_SRC
#+RESULTS:
: sh: 2: bundle: not found
Somewhat related http://kitchingroup.cheme.cmu.edu/blog/2015/01/04/Redirecting-stderr-in-org-mode-shell-blocks/