I am using org-babel for running shell commands. I'd like to export the code block as if it was running from the terminal, so adding "user@machine" before each command.

When I export the org file to latex I am getting the shell commands only.

For example:

#+begin_src shell :results output replace :exports both
  netstat -an | grep 192

Gets outputted as:

netstat -an | grep 192

And I'd like it to be exported as:

  user@machine ~ $: netstat -an | grep 192


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.