[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [babel] problem with sh blocks
From: |
Andreas Leha |
Subject: |
Re: [O] [babel] problem with sh blocks |
Date: |
Mon, 20 Feb 2012 18:51:05 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux) |
Eric Schulte <address@hidden> writes:
Hi Eric,
> Hi,
>
> As with the other recent sh-block email, the problem is likely due to
> the interpreter used (e.g., bash as compared to dash). See the value of
> `org-babel-sh-command' which defaults to "sh" which defaults to a POSIX
> rather than bash shell on many systems.
>
> Best,
>
> Andreas Leha <address@hidden> writes:
>
>> Hi all,
>>
>> why is it, that I can not use this code in sh blocks (I get sh: 2: Bad
>> substitution), even though it is valid when I run the tangled
>> script? Is this a known thing?
>>
>> #+begin_src sh :shebang "#!/bin/bash" :tangle test.sh
>> for i in *.org; do
>> echo cp "$i" "${i/%.org/.bak.org}"
>> done
>> #+end_src
>>
>> How can I get the above block to execute?
>>
>> Thanks in advance,
>> Andreas
>>
>>
thanks a lot! The org-babel-sh-command did the trick!
Cheers,
Andreas