[comp.sys.apollo] shell script continuation on error

allard@bnlux0.bnl.gov (Rick Allard) (09/29/88)

Question:

I am running a script that produces a trivial error, but I would like
it to continue.  How do I tell it to do this.  More concretely: It is
fpat piped into chpat so that all lines with "0 occurrences" are
tossed.  But fpat comes upon some links it cannot resolve, i.e. fpat
apparently doesn't pursue links, and so the script will not continue
with chpat.

Thanks, Rick
-- 
ooooooooooooootter#spoon in bowl
!!!!!!!!!!!!&   RooM    &
!!!!!!!!!!!!R   oooo    M

dbfunk@ICAEN.UIOWA.EDU (David B. Funk) (10/12/88)

WRT posting <634@bnlux0.bnl.gov> from allard%bnlux0.uucp@sbcs.sunysb.edu  (Rick Allard)

> I am running a script that produces a trivial error, but I would like
> it to continue.  How do I tell it to do this.  More concretely: It is
> fpat piped into chpat so that all lines with "0 occurrences" are
> tossed.  But fpat comes upon some links it cannot resolve, i.e. fpat
> apparently doesn't pursue links, and so the script will not continue
> with chpat.

The "abort severity level" sets the level of program exit status that
a subshell (shell script, pipe, subshell) is willing to tolerate before
it dies. If all programs invoked within the shell have an exit status
level that is below the "abort severity level" then the shell runs to
completion, as soon as one reaches or exceedes it, the shell exits.
The default "abort severity level" is set to "-error". The shell intrinsic
command "abtsev" is used to set the level, see its help file for more
info.
So, if you set the "abort severity level" to "-max_severity" within the
shell script (or before invoking it) then the shell will run to completion
regardless of what the programs do.

Dave Funk.
University of Iowa