[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Intriguing error with arithmetic evaluation

From: Greg Wooledge
Subject: Re: Intriguing error with arithmetic evaluation
Date: Mon, 15 Aug 2016 09:01:10 -0400
User-agent: Mutt/

On Mon, Aug 15, 2016 at 03:15:13AM -0700, L. A. Walsh wrote:
> Calculations shouldn't ever trigger "-e" except for things like
> division by 0 (which doesn't trigger it, as the calculation dies
> before an return value can be calculated); it's counter-intuitive.

You may wish as hard as you like, but wishing will not change reality.
The reality is that set -e is worse than useless rubbish.  It is
deceptive.  It is a trap for the unwary.  It makes you THINK you're using
some sophisticated advanced scripting language with exception handling,
but you are NOT.  You are using a horrible duct-tape hack from the

The sooner you acknowledge that set -e is NOT intended for use in new
scripts, but instead is ONLY provided to make those old mid-1970s scripts
continue to "run" the same way today as they did back then, the better
off you will be.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]