Re: Add "nice -10" to /etc/crontab run-parts commands?
Tommi Virtanen <email@example.com> writes:
> > onacpow && run_heavy_job
> The later will crash & burn if any script uses set -e
> (which is usually encouraged).
> if onacpow; then run_heavy_job; fi
Hm? Am I missing something here? Excerpt from the bash(1) man-page:
set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
-e 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 via !.
So bash doesn't crash or burn - is this behaviour limited to bash?
Or go for generality ... Add a programming language for extensibility
and write part of the program in that language.
--- GNU Coding Standards