bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -e does not work with subscript


From: Stepan Koltsov
Subject: Re: -e does not work with subscript
Date: Wed, 30 Jan 2008 00:24:55 +0300

On 1/30/08, Bob Proulx <address@hidden> 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 can be rewritten as
> > ( cd some-dir && ./build.sh ) || false
>
> Of course the script can also be written as:
>
>   make -C some-dir

-C flag of make is the reason while such strange behavior of bash is
not well known ;-)

S.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]