bash 3.2 match operator problem

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

Re: PIPESTATUS within assignment statements.

2006-10-11 Thread Chet Ramey
> a=$(COMMAND1 | COMMAND2 | COMMAND3) > > How can I get return status from COMMAND2? a=$(COMMAND1 | COMMAND2 | COMMAND3 ; exit ${PIPESTATUS[1]} ) c2exit=$? This will get you what you want in the majority of cases. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer

Re: builtin time

2006-10-11 Thread mwoehlke
Gabor Mayer wrote: GNU bash, version 3.1.17(1)-release (x86_64-pc-linux-gnu) # builtin time bash: builtin: time: not a shell builtin $ type time time is a shell keyword I don't think this is a bug, even though it feels like one. :-) 'time' is a keyword like 'if', 'for', 'do', 'function', etc.

PIPESTATUS within assignment statements.

2006-10-11 Thread Javier . Barroso
a=$(COMMAND1 | COMMAND2 | COMMAND3) How can I get return status from COMMAND2? 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='i48

builtin time

2006-10-11 Thread Gabor Mayer
GNU bash, version 3.1.17(1)-release (x86_64-pc-linux-gnu) # builtin time bash: builtin: time: not a shell builtin ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: How to detect bash?

2006-10-11 Thread mwoehlke
(Sorry for the double-post, I saw your CC and replied privately before I noticed that you did in fact send to the list also.) Ramprasad wrote: On Wed, 2006-10-11 at 02:38, mwoehlke wrote: Anyone have any clever, VERY reliable tricks for detecting if the current shell is bash? Hope, i thin

Re: How to detect bash?

2006-10-11 Thread mwoehlke
Paul Jarc wrote: 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", wh

Re: How to detect bash?

2006-10-11 Thread mwoehlke
Stephane Chazelas wrote: On Tue, Oct 10, 2006 at 06:14:22PM -0500, mwoehlke wrote: [...] $ zsh -c 'echo "`/dev/null 2>&1`"' bash bash: /dev/null: Permission denied $ zsh $ ARGV0=bash ash -c 'echo "`/dev/null 2>&1`"; echo $BASH' bash: /dev/null: Permission denied Eh? I get: $ zsh -c 'echo "`/d

Re: How to detect bash?

2006-10-11 Thread Ramprasad
On Wed, 2006-10-11 at 02:38, mwoehlke wrote: > Anyone have any clever, VERY reliable tricks for detecting if the > current shell is bash? Hope, i think you can get from `/proc/$$/exe' ? -- Ramprasad B ___ Bug-bash mailing list Bug-bash@gnu.org ht

Re: Tilde expansion not performed during variable evaluation

2006-10-11 Thread Andreas Schwab
Karen Etheridge <[EMAIL PROTECTED]> writes: > Tilde expansion is not being performed when variables are being evaluated. This is how it is supposed to be. Tilde expansion is performed before parameter expansion, as described in the manual. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PRO

Re: Bug-bash Digest, Vol 47, Issue 9

2006-10-11 Thread Thomas Mellman
[EMAIL PROTECTED] wrote: --- Message: 1 Date: Tue, 10 Oct 2006 16:08:05 -0500 From: mwoehlke <[EMAIL PROTECTED]> Subject: How to detect bash? To: bug-bash@gnu.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Anyone have any clever, VERY reliab

Re: How to detect bash?

2006-10-11 Thread Stephane Chazelas
On Tue, Oct 10, 2006 at 06:14:22PM -0500, mwoehlke wrote: [...] > >$ zsh -c 'echo "`/dev/null 2>&1`"' bash > >bash: /dev/null: Permission denied > > > >$ zsh > >$ ARGV0=bash ash -c 'echo "`/dev/null 2>&1`"; echo $BASH' > >bash: /dev/null: Permission denied > > Eh? I get: > > $ zsh -c 'echo "`/dev