bug-bash
[Top][All Lists]
Advanced

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

Re: Logical operators in arithmetic evaluation: documentation vs impleme


From: Chet Ramey
Subject: Re: Logical operators in arithmetic evaluation: documentation vs implementation
Date: Thu, 18 Apr 2013 11:20:06 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130307 Thunderbird/17.0.4

On 4/18/13 10:40 AM, Greg Wooledge wrote:

>       The order of expansions is: brace expansion, tilde expansion,
>       parameter, variable and arithmetic expansion and command substitution
>       (done in a left-to-right fashion), word splitting, and pathname
>       expansion.
> 
> It's not clear from this part of the documentation how bash handles
> a command substitution nested inside an arithmetic expansion, but you've
> experimentally demonstrated that the nested substitution is performed
> first.

The "Arithmetic Expansion" section says:

All tokens in the expression undergo parameter expansion, string
expansion, command substitution, and quote removal.

This is fairly consistent with what Posix says, but I think I will change
the "string expansion" to something that is used elsewhere in the document.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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