On 4/23/19 5:49 PM, Ian Neal wrote:

> Bash Version: 4.2
> Patch Level: 46
> Release Status: release
> 
> Description:
>     When using arithmetic expansion with variable pre- and
> post-increments/decrements in the output redirection file path,
> specifically on external executables (not builtins or functions), the state
> of the variable being incremented/decremented is not persisted in the
> environment.

The redirection is expanded in the environment of the command. In the
second case, that means the child process forked to run /bin/true.

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

Reply via email to