Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[9fans] exit an rc script on any error; equivalent of bash's set -e

2 views
Skip to first unread message

Rudolf Sykora

unread,
Nov 16, 2009, 2:29:10 PM11/16/09
to
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

erik quanstrom

unread,
Nov 16, 2009, 2:34:14 PM11/16/09
to

see rc(1) invocation section. see -e. this can be set
% flag e

- erik

Rudolf Sykora

unread,
Nov 16, 2009, 2:34:11 PM11/16/09
to
Ok!
rc -e script
seems to be the way...
I finally found it.

Thanks
Ruda

2009/11/16 Rudolf Sykora <rudolf...@gmail.com>

Rudolf Sykora

unread,
Nov 16, 2009, 2:35:44 PM11/16/09
to

see rc(1) invocation section.  see -e.  this can be set
       % flag e

- erik

Thanks!
Ruda
0 new messages