[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] passing string to sh source code block

From: Daniel Herzig
Subject: Re: [O] passing string to sh source code block
Date: Sat, 16 Mar 2019 13:07:25 +0000

Sorry, I found my mistake. I'll post it anyway, maybe it's of use to

My path contains spaces, so I had to change the code a bit (see below).

Daniel Herzig <address@hidden> writes:

> 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

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

Like this it works as needed.

> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]