Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Greg Wooledge Newsgroups: gnu.bash.bug Subject: Re: expression evaluation problem Date: Thu, 25 Jul 2019 13:34:08 -0400 Lines: 23 Approved: bug-bash@gnu.org Message-ID: References: <5D3889D2.3090101@tlinx.org> <20190724175103.GN1218@eeg.ccf.org> <5D38A6BF.9020309@tlinx.org> <20190724184943.GO1218@eeg.ccf.org> <5D39E6E4.8030902@tlinx.org> <20190725173408.GX1218@eeg.ccf.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: usenet.stanford.edu 1564076079 5435 209.51.188.17 (25 Jul 2019 17:34:39 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash@gnu.org Envelope-to: bug-bash@gnu.org Mail-Followup-To: bug-bash@gnu.org Content-Disposition: inline In-Reply-To: <5D39E6E4.8030902@tlinx.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 139.137.100.1 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20190725173408.GX1218@eeg.ccf.org> X-Mailman-Original-References: <5D3889D2.3090101@tlinx.org> <20190724175103.GN1218@eeg.ccf.org> <5D38A6BF.9020309@tlinx.org> <20190724184943.GO1218@eeg.ccf.org> <5D39E6E4.8030902@tlinx.org> Xref: csiph.com gnu.bash.bug:15246 On Thu, Jul 25, 2019 at 10:29:08AM -0700, L A Walsh wrote: > On 2019/07/24 11:49, Greg Wooledge wrote: > > $((expression)) > > > > The expression is treated as if it were within double quotes, > I didn't use $((...)), I'd put the whole thing in ((...)) which I hoped > would treat the whole expression consistently. ((expression)) The expression is evaluated according to the rules described be‐ low under ARITHMETIC EVALUATION. [...] ARITHMETIC EVALUATION [...] Shell variables are allowed as operands; parameter expansion is per‐ formed before the expression is evaluated.