help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Arithmetic evaluation / expansion question


From: Greg Wooledge
Subject: Re: [Help-bash] Arithmetic evaluation / expansion question
Date: Thu, 11 Oct 2018 10:48:05 -0400
User-agent: NeoMutt/20170113 (1.7.2)

On Thu, Oct 11, 2018 at 10:33:55AM -0400, Chet Ramey wrote:
> No, Greg. If the evaluator encounters a token that looks like a shell
> identifier, its value is treated as an expression (if it's unset, that
> expression evaluates to 0). This expression is run through the evaluator
> again, as if it had been seen inline in parens. This is what makes
> 
> ten='2 * 5'
> echo $(( ten ))
> echo $(( $ten ))
> 
> both echo `10'. I'm surprised you said that, because this has come up a
> number of times in the past, but your wiki has the same error.

OK, thanks.  Corrected it on the wiki page.
https://mywiki.wooledge.org/ArithmeticExpression



reply via email to

[Prev in Thread] Current Thread [Next in Thread]