Re: Tilde expansion not performed during variable evaluation

2006-10-10 Thread Paul Jarc
Karen Etheridge <[EMAIL PROTECTED]> wrote: > Tilde expansion is not being performed when variables are being evaluated. That's normal, documented behavior. man bash, EXPANSION: The order of expansions is: brace expansion, tilde expansion, parameter, variable and arithmetic expan

Re: How to detect bash?

2006-10-10 Thread Paul Jarc
mwoehlke <[EMAIL PROTECTED]> wrote: > And since when does '#! /bin/bash' mean "use whatever 'bash' you > find in $PATH"? Silly me, I thought it meant "use '/bin/bash'". Dave did say "hash-bang", but he didn't say "#! /bin/bash". Possibly he's thinking of "#!/usr/bin/env bash", which should do wha

Re: How to detect bash?

2006-10-10 Thread Bob Proulx
mwoehlke wrote: > Anyone have any clever, VERY reliable tricks for detecting if the > current shell is bash? The obvious way is '[ -n "$BASH" ]', but in the I would probably avoid the clever and go with the simple to understand and unlikely to be accidentally invoked method. test ${BASH_VERSION

Tilde expansion not performed during variable evaluation

2006-10-10 Thread Karen Etheridge
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: darwin8.7.1 Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='darwin8.7.1' -DCONF_MACHTYPE='i386-apple-darwin8.7.1' -DCONF_VENDOR='apple' -DLOCALEDIR='/usr/local/share/lo

exec 10>&- does not close fd 10

2006-10-10 Thread alex . dupuy
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: x86_64-redhat-linux-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR

Re: How to detect bash?

2006-10-10 Thread mwoehlke
Dave Rutherford wrote: On 10/10/06, mwoehlke <[EMAIL PROTECTED]> wrote: Completely non-workable. That only works if the bash I want is in /bin/bash Well, no. It works as long as the last thing in the path is 'bash'. It could be /usr/bin/bash, /home/bin/bash, or yes, /bin/bash. But why the h

Re: How to detect bash?

2006-10-10 Thread Dave Rutherford
On 10/10/06, mwoehlke <[EMAIL PROTECTED]> wrote: Completely non-workable. That only works if the bash I want is in /bin/bash Well, no. It works as long as the last thing in the path is 'bash'. It could be /usr/bin/bash, /home/bin/bash, or yes, /bin/bash. But why the heck don't you know, if t

Re: How to detect bash?

2006-10-10 Thread mwoehlke
Stephane Chazelas wrote: On Tue, Oct 10, 2006 at 05:12:07PM -0500, mwoehlke wrote: Dave Rutherford wrote: On 10/10/06, mwoehlke <[EMAIL PROTECTED]> wrote: Anyone have any clever, VERY reliable tricks for detecting if the current shell is bash? Well, I don't know if it's clever, but how about:

Re: How to detect bash?

2006-10-10 Thread Stephane Chazelas
On Tue, Oct 10, 2006 at 05:12:07PM -0500, mwoehlke wrote: > Dave Rutherford wrote: > >On 10/10/06, mwoehlke <[EMAIL PROTECTED]> wrote: > >>Anyone have any clever, VERY reliable tricks for detecting if the > >>current shell is bash? > > > >Well, I don't know if it's clever, but how about: > > Oh, m

Re: How to detect bash?

2006-10-10 Thread mwoehlke
Dave Rutherford wrote: On 10/10/06, mwoehlke <[EMAIL PROTECTED]> wrote: Anyone have any clever, VERY reliable tricks for detecting if the current shell is bash? Well, I don't know if it's clever, but how about: Oh, my... Where do I *start*? $ if [ "${SHELL//*/bash}" = "bash" ]; then echo y

Re: How to detect bash?

2006-10-10 Thread Dave Rutherford
On 10/10/06, mwoehlke <[EMAIL PROTECTED]> wrote: Anyone have any clever, VERY reliable tricks for detecting if the current shell is bash? Well, I don't know if it's clever, but how about: $ if [ "${SHELL//*/bash}" = "bash" ]; then echo y; fi But better to use the hash-bang and make SURE the s

How to detect bash?

2006-10-10 Thread mwoehlke
Anyone have any clever, VERY reliable tricks for detecting if the current shell is bash? The obvious way is '[ -n "$BASH" ]', but in the interest of catching idiots that set BASH to get around such a check, I came up with: [ "`BASH_SUBSHELL=975 ; ( echo $BASH_SUBSHELL )`" -eq 976 ] (975 is of

BASH doesn't make new process group, when process substitution used

2006-10-10 Thread root
Configuration Information [Automatically generated, do not change]: Machine: i486 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='ba