Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16828

Re: Incrementing variable=0 with arithmetic expansion causes Return code = 1

From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups gnu.bash.bug
Subject Re: Incrementing variable=0 with arithmetic expansion causes Return code = 1
Date 2020-08-28 11:22 -0400
Message-ID <mailman.1612.1598628204.2469.bug-bash@gnu.org> (permalink)
References <GVAP278MB0118201C70D7FAF7B4DF612D98520@GVAP278MB0118.CHEP278.PROD.OUTLOOK.COM> <20200828152252.GH931@eeg.ccf.org>

Show all headers | View raw


On Fri, Aug 28, 2020 at 08:00:30AM +0000, Gabriel Winkler wrote:
> # Causes error
> test=0
> ((test++))
> echo $?
> 1
> echo $test
> 1

https://mywiki.wooledge.org/BashFAQ/105

Exercise 1.  And 2.  And the whole rest of the page.

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Incrementing variable=0 with arithmetic expansion causes Return code = 1 Greg Wooledge <wooledg@eeg.ccf.org> - 2020-08-28 11:22 -0400

csiph-web