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
> 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
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.
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
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
(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
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
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
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
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
[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
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
12 matches
Mail list logo