From mboxrd@z Thu Jan 1 00:00:00 1970 From: Panruo Wu Subject: org babel execute shell in sh? Date: Wed, 7 Mar 2012 10:25:56 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=90e6ba615156cd026a04baaa73cc Return-path: Received: from eggs.gnu.org ([208.118.235.92]:43206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5Kcn-0003us-1M for emacs-orgmode@gnu.org; Wed, 07 Mar 2012 12:26:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5Kcl-0004Wt-AW for emacs-orgmode@gnu.org; Wed, 07 Mar 2012 12:26:04 -0500 Received: from mail-bk0-f41.google.com ([209.85.214.41]:47251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5Kcl-0004Wn-44 for emacs-orgmode@gnu.org; Wed, 07 Mar 2012 12:26:03 -0500 Received: by bkwq16 with SMTP id q16so6726456bkw.0 for ; Wed, 07 Mar 2012 09:25:59 -0800 (PST) Received: by eeke53 with SMTP id e53so2564135eek.0 for ; Wed, 07 Mar 2012 09:25:56 -0800 (PST) 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: emacs-orgmode@gnu.org --90e6ba615156cd026a04baaa73cc Content-Type: text/plain; charset=ISO-8859-1 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 Thanks, robb --90e6ba615156cd026a04baaa73cc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Dear list,

#+begin_src sh=A0
for np in {1..32}
= do
=A0 =A0 echo $np
done
#+end_src
=
when executing, the output only shows
{1..32}
which is clearly not I want..

After some investiga= tion, I found that orgmode
uses "sh" that cannot unders= tand the for loop above.

My question is, how can I= suggest orgmode to use
"bash" to execute shell script?

I t= ried :shebang #!/bin/bash but it does not work

Tha= nks,
robb
=A0
--90e6ba615156cd026a04baaa73cc--