emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniel Herzig <daniel.herzig@outlook.at>
To: Orgmode Mailing List <emacs-orgmode@gnu.org>
Subject: passing string to sh source code block
Date: Sat, 16 Mar 2019 12:47:48 +0000	[thread overview]
Message-ID: <DB7PR06MB4679FCA61C9BF2111073357C86450@DB7PR06MB4679.eurprd06.prod.outlook.com> (raw)

Hi!

I am trying to pass a path to an org-source-codeblock using the :var tag
in the header:

#+BEGIN_SRC sh :var directory="/x/y/z"
cd directory
ls
#+END_SRC

The output of the ls command shows that I obviously stay in the location
of my .org file (not "/x/y/z") -- is there a way to pass the path to the source
codeblock, without having to enter the path inside the block?

Any hint appreciated, thanks in advance,

cheers,
Daniel

             reply	other threads:[~2019-03-16 12:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-16 12:47 Daniel Herzig [this message]
     [not found] <878sxfdlzi.fsf@outlook.at>
2019-03-16 13:07 ` passing string to sh source code block Daniel Herzig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB7PR06MB4679FCA61C9BF2111073357C86450@DB7PR06MB4679.eurprd06.prod.outlook.com \
    --to=daniel.herzig@outlook.at \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).