From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 16 Nov 2009 20:31:55 +0100 Message-ID: From: Rudolf Sykora To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=000e0cd151d0f62bbd0478820f64 Subject: Re: [9fans] exit an rc script on any error; equivalent of bash's set -e Topicbox-Message-UUID: 9c80c7c4-ead5-11e9-9d60-3106f5b1d025 --000e0cd151d0f62bbd0478820f64 Content-Type: text/plain; charset=ISO-8859-1 Ok! rc -e script seems to be the way... I finally found it. Thanks Ruda 2009/11/16 Rudolf Sykora > Hello, > > is there anything similar to the bash's > set -e > (that causes a script to terminate whenever any command in the script > returns a failure) > in rc? > Or do I have to always write sth like > command1 || exit > command2 || exit > ... > ? > > Thank you > Ruda > --000e0cd151d0f62bbd0478820f64 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Ok!
rc -e script
seems to be the way...
I finally found it.
Thanks
Ruda

2009/11/16 Rudolf Sykora = <rudolf.syk= ora@gmail.com>
Hello,

is = there anything similar to the bash's
set -e
(that causes a script= to terminate whenever any command in the script returns a failure)
in rc?
Or do I have to always write sth like
command1 || exit
command2 || exit
...
?

Thank you
Ruda

--000e0cd151d0f62bbd0478820f64--