[ILUG] Bash
Brendan Halpin
brendan.halpin at ul.ie
Mon Jan 21 21:07:16 GMT 2002
John Tobin <tobinjt at netsoc.tcd.ie> wrote:
> On Mon, Jan 21, 2002 at 05:43:34PM +0000, Brendan Halpin wrote:
> ? With a bash script that runs a simple series of commands, how do I
> ? make it crash out if any one command fails, without filling it with
> set -e
> >From the bash manpage:
>
> Exit immediately if a simple command (see SHELL GRAMMAR above) exits
> with a non-zero status. The shell does not exit if the command that
> fails is part of an until or while loop, part of an if statement, part
> of a && or || list, or if the command's return value is being inverted
Excellent, exactly what I was looking for. Thanks (and to Sean and
Rick).
Brendan
--
Brendan Halpin, Dept of Government and Society, Limerick University, Ireland
Tel: w +353-61-213147; f +353-61-202569; h +353-61-385276; Room S1-03 x 3147
<mailto:brendan.halpin at ul.ie> <http://wivenhoe.staff8.ul.ie/~brendan>
More information about the ILUG
mailing list