Stepan Koltsov wrote:
BTW, my use case for "(false)" is:
===
set -e
( cd some-dir && make )
( cd other-dir && ./build.sh )
( cd third-dir && ant )
===
Most readers (and writers) expect script to fail if "make" failed. So
I think that outer bash should exit with error on "(false)" :-)
On 1/30/08, Bob Proulx <[EMAIL PROTECTED]> wrote:
> Stepan Koltsov wrote:
> > set -e
> > ( cd some-dir && ./build.sh )
> > ...
> > Most readers (and writers) expect script to fail if "./build.sh" failed. So
> > I think that outer bash should exit with error on "(false)" :-)
> > Of course, script ca
Stepan Koltsov wrote:
> set -e
> ( cd some-dir && make )
> ...
> Most readers (and writers) expect script to fail if "make" failed. So
> I think that outer bash should exit with error on "(false)" :-)
> Of course, script can be rewritten as
> ( cd some-dir && make ) || false
Of course the script c
BTW, my use case for "(false)" is:
===
set -e
( cd some-dir && make )
( cd other-dir && ./build.sh )
( cd third-dir && ant )
===
Most readers (and writers) expect script to fail if "make" failed. So
I think that outer bash should exit with error on "(false)" :-)
Of course, script can be rewritte
On Jan 29, 2008 8:09 PM, Stepan Koltsov <[EMAIL PROTECTED]> wrote:
> What is "simple command"?
>
> Is
>
> ===
> ( false ) || false
> ===
>
> simple? Seems like it is not, however
>
> ===
> set -e
>
> ( false ) || false
>
> echo "end"
> ===
>
> Prints nothing and exits with error.
Indeed according
What is "simple command"?
Is
===
( false ) || false
===
simple? Seems like it is not, however
===
set -e
( false ) || false
echo "end"
===
Prints nothing and exits with error.
S.
On 1/29/08, Pierre Gaston <[EMAIL PROTECTED]> wrote:
> On Jan 29, 2008 10:04 AM, Stepan Koltsov <[EMAIL PROTECT
On Jan 29, 2008 10:04 AM, Stepan Koltsov <[EMAIL PROTECTED]> wrote:
>
> Bash must exit the shell too. Because
>
> $ bash -ce '(false); echo $?'
> 1
>
> S.
>
(false) is a compound command, the bash exits with set -e only if a
simple command exits with false
> $ bash -ce '(false;echo foo);echo bar'
> bar
could i ask what the command line option '-e' mean?
i did not find any explanation in bash's manual.
PS:
[EMAIL PROTECTED] ~]# bash --version
GNU bash, version 3.1.17(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, I
On 1/29/08, Pierre Gaston <[EMAIL PROTECTED]> wrote:
> On Jan 28, 2008 11:36 PM, <[EMAIL PROTECTED]> wrote:
> > Configuration Information [Automatically generated, do not change]:
> > Machine: i486
> > OS: linux-gnu
> > Compiler: gcc
> > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486'
> It has the same effect as set -e, you can pass the options of set to
> bash directly bash -x etc...
>
got it. thanks
> The manual says:
> "In addition to the single-character shell options documented in the
> description of the set builtin command, bash interprets the following
> options when
On Jan 29, 2008 9:32 AM, 龙海涛 <[EMAIL PROTECTED]> wrote:
>
> > $ bash -ce '(false;echo foo);echo bar'
> > bar
> could i ask what the command line option '-e' mean?
> i did not find any explanation in bash's manual.
It has the same effect as set -e, you can pass the options of set to
bash directly b
On Jan 28, 2008 11:36 PM, <[EMAIL PROTECTED]> wrote:
> 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'
12 matches
Mail list logo