From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: org babel execute shell in sh? Date: Wed, 07 Mar 2012 19:22:38 -0500 Message-ID: <4878.1331166158@alphaville> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5R80-0006bk-FK for emacs-orgmode@gnu.org; Wed, 07 Mar 2012 19:22:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5R7y-0006kp-GB for emacs-orgmode@gnu.org; Wed, 07 Mar 2012 19:22:44 -0500 Received: from g4t0016.houston.hp.com ([15.201.24.19]:14240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5R7y-0006kj-BI for emacs-orgmode@gnu.org; Wed, 07 Mar 2012 19:22:42 -0500 In-Reply-To: Message from Panruo Wu of "Wed, 07 Mar 2012 10:25:56 MST." 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: Panruo Wu Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Panruo Wu wrote: > 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 > Not a solution, just a workaround: you can write the loop as --8<---------------cut here---------------start------------->8--- #+begin_src sh for np in $(seq 1 32) do echo $np done #+end_src --8<---------------cut here---------------end--------------->8--- Nick