help-bash
[Top][All Lists]
Advanced

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

Re: Why does this do what it does: $((name)) ?


From: Chet Ramey
Subject: Re: Why does this do what it does: $((name)) ?
Date: Thu, 3 Jul 2025 10:01:34 -0400
User-agent: Mozilla Thunderbird

On 7/3/25 9:26 AM, Stan Marsh wrote:

Pardon me for saying this, but this sounds insane.  Who dreamed this up?

David Korn.

And, finally, again, where can I read about this wonderful "feature"?  I 
couldn't find
it in "man bash".

"Within an expression, shell
 variables  may  also  be referenced by name without using the parameter
 expansion syntax.  This means you can use "x", where x is a shell vari-
 able name, in an arithmetic expression, and the shell will evaluate its
 value as an expression and use the result."

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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