[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
- Re: [Help-bash] Arithmetic evaluation / expansion question, (continued)
- Re: [Help-bash] Arithmetic evaluation / expansion question, Andy Chu, 2018/10/10
- Re: [Help-bash] Arithmetic evaluation / expansion question, Andy Chu, 2018/10/10
- Re: [Help-bash] Arithmetic evaluation / expansion question, Bruce Hohl, 2018/10/10
- Re: [Help-bash] Arithmetic evaluation / expansion question, Andy Chu, 2018/10/10
- Re: [Help-bash] Arithmetic evaluation / expansion question, Bruce Hohl, 2018/10/10
- Re: [Help-bash] Arithmetic evaluation / expansion question, Quentin L'Hours, 2018/10/10
- Re: [Help-bash] Arithmetic evaluation / expansion question, Bruce Hohl, 2018/10/10
- Re: [Help-bash] Arithmetic evaluation / expansion question, Chet Ramey, 2018/10/11
- Re: [Help-bash] Arithmetic evaluation / expansion question, Chet Ramey, 2018/10/11
Re: [Help-bash] Arithmetic evaluation / expansion question, Chet Ramey, 2018/10/11
- Re: [Help-bash] Arithmetic evaluation / expansion question,
Greg Wooledge <=
Re: [Help-bash] Arithmetic evaluation / expansion question, Chet Ramey, 2018/10/11