From mboxrd@z Thu Jan 1 00:00:00 1970 From: Panruo Wu Subject: Re: org babel execute shell in sh? Date: Fri, 9 Mar 2012 13:34:47 -0700 Message-ID: References: <87fwdj67q2.fsf@goochesa.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d04083df1d147a004bad5521d Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S66Wd-0001Hv-Gr for emacs-orgmode@gnu.org; Fri, 09 Mar 2012 15:34:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S66Wb-0000a7-5W for emacs-orgmode@gnu.org; Fri, 09 Mar 2012 15:34:54 -0500 Received: from mail-we0-f169.google.com ([74.125.82.169]:60174) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S66Wa-0000Zb-Qx for emacs-orgmode@gnu.org; Fri, 09 Mar 2012 15:34:53 -0500 Received: by werj55 with SMTP id j55so1759054wer.0 for ; Fri, 09 Mar 2012 12:34:49 -0800 (PST) Received: by lagz14 with SMTP id z14so2574487lag.0 for ; Fri, 09 Mar 2012 12:34:47 -0800 (PST) In-Reply-To: <87fwdj67q2.fsf@goochesa.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Tom Regner Cc: emacs-orgmode@gnu.org --f46d04083df1d147a004bad5521d Content-Type: text/plain; charset=ISO-8859-1 Thanks tom! This is exactly what I need. regards, robb On Wed, Mar 7, 2012 at 9:24 PM, Tom Regner wrote: > Hi, > > Panruo Wu writes: > > > Dear list, > > > > > > #+begin_src sh > > for np in {1..32} > > do > > echo $np > > done > > #+end_src > > > > when executing, the output only shows > > {1..32} > > which is clearly not I want.. > > > > After some investigation, I found that orgmode > > uses "sh" that cannot understand the for loop above. > > > > My question is, how can I suggest orgmode to use > > "bash" to execute shell script? > > > > I tried :shebang #!/bin/bash but it does not work > > I have the following in my config: > > --------------------%<-------------------------- > I really like org-babel to use zsh > #+begin_src emacs-lisp > (setq org-babel-sh-command "zsh") > #+end_src > --------------------%<-------------------------- > > It is apparently not possible to set this variable via #+BIND: to only > change this for one code block, at least I did not succeed to do so in > my attempts to do so -- but maybe I just didn't read enough of the > documentation to /get it right/. > > I don't know, if zsh||bash instead of sh breaks any assumptions org-mode > makes about the environment in which sh code blocks are executed; up > until now it works like a charm. > > Kind regards, > Tom > --f46d04083df1d147a004bad5521d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks tom! This is exactly what I need.

regards,
<= div>robb


--f46d04083df1d147a004bad5521d--