Panruo Wu <p...@mymail.mines.edu> 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