emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <eric.schulte@gmx.com>
To: Andreas Leha <andreas.leha@med.uni-goettingen.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: [babel] problem with sh blocks
Date: Mon, 20 Feb 2012 06:59:07 -0700	[thread overview]
Message-ID: <87d399mpq4.fsf@gmx.com> (raw)
In-Reply-To: 87k43ic5c9.fsf@med.uni-goettingen.de


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.


Andreas Leha <andreas.leha@med.uni-goettingen.de> 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

Eric Schulte

  parent reply	other threads:[~2012-02-20 16:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-20  7:49 [babel] problem with sh blocks Andreas Leha
2012-02-20  8:56 ` Sebastien Vauban
2012-02-20  9:23   ` Andreas Leha
2012-02-20 12:34     ` Sebastien Vauban
2012-02-20 12:46     ` Bernt Hansen
2012-02-23 20:08       ` Andreas Leha
2012-02-20 13:59 ` Eric Schulte [this message]
2012-02-20 17:51   ` Andreas Leha

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:

  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=87d399mpq4.fsf@gmx.com \
    --to=eric.schulte@gmx.com \
    --cc=andreas.leha@med.uni-goettingen.de \
    --cc=emacs-orgmode@gnu.org \


* 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


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).