Re: SECONDS=0 does not reset SECONDS, or I'm missing something
From:
Eli Schwartz
Subject:
Re: SECONDS=0 does not reset SECONDS, or I'm missing something
Date:
Thu, 4 Jun 2020 10:07:55 -0400
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0
On 6/4/20 9:29 AM, Steve Amerige wrote:
> I was offering some best practice advice as I don't think I'm
> constrained to answer just the question. :-)
>
> I generally welcome best practice advice in this distribution list as
> subscribers tend to use
> this list not just to get their own questions answered, but also learn
> from others in the process.
> Please do feel free to ignore any comments that you are not interested in.
You are factually incorrect. set -o errexit is NOT best practice advice.
It is heavily disputed advice. The world is split between people who
a) think set -o errexit is the best thing ever, and is wonderful advice,
and everyone should use it
b) think set -o errexit is horrificially horrible, a sign of incompetent
fools, and literally the devil's work. It eats your shellscripts for
lunch, aborts your script after completely normal commands, and
changes its semantics in point releases of a shell. See
http://mywiki.wooledge.org/BashFAQ/105
You had better be prepared for an internet debate nearly as heated as
the vim vs. emacs one, if you start telling people to use set -o errexit.
(FWIW, I'm one of the people who hold it to be the work of the devil, as
it were.)
--
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User
signature.asc Description: OpenPGP digital signature