[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org babel execute shell in sh?
From: |
Nick Dokos |
Subject: |
Re: [O] org babel execute shell in sh? |
Date: |
Wed, 07 Mar 2012 19:22:38 -0500 |
Panruo Wu <address@hidden> 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
- [O] org babel execute shell in sh?, Panruo Wu, 2012/03/07
- Re: [O] org babel execute shell in sh?,
Nick Dokos <=
- Re: [O] org babel execute shell in sh?, Tom Regner, 2012/03/07
- Re: [O] org babel execute shell in sh?, Panruo Wu, 2012/03/09
- Re: [O] org babel execute shell in sh?, Nick Dokos, 2012/03/09
- Re: [O] org babel execute shell in sh?, Tom Regner, 2012/03/10
- Re: [O] org babel execute shell in sh?, Eric Schulte, 2012/03/12
- Re: [O] org babel execute shell in sh?, Tom Regner, 2012/03/12
- Re: [O] org babel execute shell in sh?, Eric Schulte, 2012/03/12
- Re: [O] org babel execute shell in sh?, Nick Dokos, 2012/03/12