On Mon, Nov 23, 2020 at 05:20:22PM -0500, Greg Wooledge wrote:
> On Mon, Nov 23, 2020 at 07:36:29PM +, Jetzer, Bill wrote:
>...
> Exercises 1 and 2 apply directly...
>From man bash:
((expression))
The expression is evaluated according to the rules described be‐
Thank you for the clarification. I understand now.
--bill
From: Ilkka Virta
Sent: Tuesday, November 24, 2020 2:08 AM
To: Jetzer, Bill
Cc: bug-bash@gnu.org
Subject: Re: increment & decrement error when variable is 0
On Tue, Nov 24, 2020 at 12:07 AM Jetzer, Bill
mailto:
On Tue, Nov 24, 2020 at 12:07 AM Jetzer, Bill
wrote:
> ((--x)) || echo "err code $? on --x going
> from $i to $x";
>
> err code 1 on ++x going from -1 to 0
>
That's not about --x, but of the ((...)) construct:
"" (( expression ))
The arithmetic expression is
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe
-fstack-protector-strong -fno-plt
-DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/bin'