|
From: | Steve Amerige |
Subject: | Re: SECONDS=0 does not reset SECONDS, or I'm missing something |
Date: | Thu, 4 Jun 2020 09:29:15 -0400 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 |
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. Enjoy and have a great day, Steve Amerige On 6/4/2020 9:00 AM, Andreas Kusalananda Kähäri wrote:
Also, as a side note, if your script were running with set -o errexit, the conditional idiom would fail because it doesn't handle the false case. Better: if (( SECONDS > 0 )); then sleep $SECONDS fiI don't understand this, or what it has to do with my issue. Setting errexit in the shell would not terminate the script due to a failure in my AND-list (unless sleep somehow failed).
[Prev in Thread] | Current Thread | [Next in Thread] |