LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Bash

[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
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell