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
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
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
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
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
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
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
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:
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
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
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
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
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
13 matches
Mail list logo