[O] org babel execute shell in sh?

2012-03-07 Thread Panruo Wu
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

Re: [O] org babel execute shell in sh?

2012-03-07 Thread Nick Dokos
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

Re: [O] org babel execute shell in sh?

2012-03-07 Thread Tom Regner
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 lo

Re: [O] org babel execute shell in sh?

2012-03-09 Thread Panruo Wu
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 >

Re: [O] org babel execute shell in sh?

2012-03-09 Thread Nick Dokos
Tom Regner wrote: > Hi, > > Panruo Wu writes: > > > Dear list, > > > > > > #+begin_src sh=C2=A0 > > for np in {1..32} > > do > > =C2=A0 =C2=A0 echo $np > > done > > #+end_src > > > > when executing, the output only shows > > {1..32} > > which is clearly not I want.. > > > > After some investig

Re: [O] org babel execute shell in sh?

2012-03-09 Thread Tom Regner
Nick Dokos schrieb: >Tom Regner wrote: > >> Hi, >> >> Panruo Wu writes: >> >> > Dear list, >> > >> > >> > #+begin_src sh=C2=A0 >> > for np in {1..32} >> > do >> > =C2=A0 =C2=A0 echo $np >> > done >> > #+end_src >> > >> > when executing, the output only shows >> > {1..32} >> > which is clearly

Re: [O] org babel execute shell in sh?

2012-03-12 Thread Eric Schulte
> > But I'm often bitten by the distinction between export and tangling -- > :padline, :shebang come to mind, where I expected org-babel to honour > the setting in both cases. > Could you describe a use case where these options would be used for exporting and would be preferable to simply includin

Re: [O] org babel execute shell in sh?

2012-03-12 Thread Tom Regner
Eric Schulte writes: >> >> But I'm often bitten by the distinction between export and tangling -- >> :padline, :shebang come to mind, where I expected org-babel to honour >> the setting in both cases. >> > > Could you describe a use case where these options would be used for > exporting and would

Re: [O] org babel execute shell in sh?

2012-03-12 Thread Eric Schulte
Tom Regner writes: > Eric Schulte writes: > >>> >>> But I'm often bitten by the distinction between export and tangling -- >>> :padline, :shebang come to mind, where I expected org-babel to honour >>> the setting in both cases. >>> >> >> Could you describe a use case where these options would be

Re: [O] org babel execute shell in sh?

2012-03-12 Thread Nick Dokos
Eric Schulte wrote: > I just pushed up a patch which adds this behavior. It does result in > some odd new possibilities, such as the following. > > #+begin_src sh :shebang #!/bin/cat > foo > #+end_src > > #+RESULTS: > | #!/bin/cat | > || > | foo| > Maybe my settings are