Re: Shell execution ( [was] Re: Value of $? lost in the beginning of a function.)

2009-07-20 Thread Lowell Gilbert
Glen Barber glen.j.bar...@gmail.com writes: Possibly off-topic... 2009/7/19 Glen Barber glen.j.bar...@gmail.com: 2009/7/19 Romain Tartière rom...@blogreen.org: Hi Glen, On Sun, Jul 19, 2009 at 04:32:28PM -0400, Glen Barber wrote: % sh foo.sh % zsh foo.sh % bash foo.sh What happens

Re: Shell execution ( [was] Re: Value of $? lost in the beginning of a function.)

2009-07-20 Thread Glen Barber
Hi, Lowell On Mon, Jul 20, 2009 at 7:02 AM, Lowell Gilbertfreebsd-stable-lo...@be-well.ilk.org wrote: Glen Barber glen.j.bar...@gmail.com writes: Possibly off-topic... 2009/7/19 Glen Barber glen.j.bar...@gmail.com: 2009/7/19 Romain Tartière rom...@blogreen.org: Hi Glen, On Sun, Jul 19,

Re: Shell execution ( [was] Re: Value of $? lost in the beginning of a function.)

2009-07-20 Thread Lowell Gilbert
Glen Barber glen.j.bar...@gmail.com writes: Hi, Lowell On Mon, Jul 20, 2009 at 7:02 AM, Lowell Gilbertfreebsd-stable-lo...@be-well.ilk.org wrote: Glen Barber glen.j.bar...@gmail.com writes: Possibly off-topic... 2009/7/19 Glen Barber glen.j.bar...@gmail.com: 2009/7/19 Romain Tartière

Re: Shell execution ( [was] Re: Value of $? lost in the beginning of a function.)

2009-07-20 Thread Glen Barber
On Mon, Jul 20, 2009 at 1:56 PM, Lowell Gilbertfreebsd-stable-lo...@be-well.ilk.org wrote: Glen Barber glen.j.bar...@gmail.com writes: The shell specified in the #! first line is only consulted if you run it as ./foo.sh.  Otherwise, it's input to the shell that you started, and the line is

Re: Shell execution ( [was] Re: Value of $? lost in the beginning of a function.)

2009-07-20 Thread Glen Barber
On Mon, Jul 20, 2009 at 3:12 PM, Doug Bartondo...@freebsd.org wrote: Glen Barber wrote: Possibly off-topic... It's very off topic for -stable. If you want to follow up on this, please do so in -hackers. I meant to say in the last line: '#!/bin/sh' would override the 'zsh' shell. Can

Re: Shell execution ( [was] Re: Value of $? lost in the beginning of a function.)

2009-07-20 Thread Doug Barton
Glen Barber wrote: Possibly off-topic... It's very off topic for -stable. If you want to follow up on this, please do so in -hackers. I meant to say in the last line: '#!/bin/sh' would override the 'zsh' shell. Can someone enlighten me if I am wrong about this? It's trivial to create an

Shell execution ( [was] Re: Value of $? lost in the beginning of a function.)

2009-07-19 Thread Glen Barber
Possibly off-topic... 2009/7/19 Glen Barber glen.j.bar...@gmail.com: 2009/7/19 Romain Tartière rom...@blogreen.org: Hi Glen, On Sun, Jul 19, 2009 at 04:32:28PM -0400, Glen Barber wrote: % sh foo.sh % zsh foo.sh % bash foo.sh What happens if you replace '#!/bin/sh' with

Re: Shell execution ( [was] Re: Value of $? lost in the beginning of a function.)

2009-07-19 Thread Mark Andrews
In message 4ad871310907191717g1ed90be7y92250f2addc38...@mail.gmail.com, Glen Barber writes: Possibly off-topic... 2009/7/19 Glen Barber glen.j.bar...@gmail.com: 2009/7/19 Romain Tarti=E8re rom...@blogreen.org: Hi Glen, On Sun, Jul 19, 2009 at 04:32:28PM -0400, Glen Barber wrote:

Re: Shell execution ( [was] Re: Value of $? lost in the beginning of a function.)

2009-07-19 Thread Glen Barber
On Sun, Jul 19, 2009 at 9:02 PM, Mark Andrewsma...@isc.org wrote: In message 4ad871310907191717g1ed90be7y92250f2addc38...@mail.gmail.com, Glen Barber writes: Possibly off-topic... 2009/7/19 Glen Barber glen.j.bar...@gmail.com: 2009/7/19 Romain Tarti=E8re rom...@blogreen.org: Hi Glen,

Re: Shell execution ( [was] Re: Value of $? lost in the beginning of a function.)

2009-07-19 Thread Ian Smith
On Mon, 20 Jul 2009, Mark Andrews wrote: In message 4ad871310907191717g1ed90be7y92250f2addc38...@mail.gmail.com, Glen Barber writes: Possibly off-topic... [..] My understanding was this: If you specify 'sh foo.sh' at the shell, the script will be run in a /bin/sh shell,