[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Arithmetic expansion with increments and output redirection
From: |
Chet Ramey |
Subject: |
Re: Arithmetic expansion with increments and output redirection |
Date: |
Wed, 24 Apr 2019 09:43:06 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 4/24/19 9:07 AM, Andreas Schwab wrote:
>> The /bin/true forces the use of an external command, which means a subshell
>> is forked. The redirection occurs in the forked subshell.
>
> But the expansion isn't required to be performed in the subshell. I
> don't see POSIX having any wording to require one or the other.
I think the POSIX wording is carefully crafted to allow all behaviors.
> Doing
> the expansion before the fork looks reasonable, even if only to make it
> consistent with builtins.
Is that consistency more valuable than avoiding side effects?
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU address@hidden http://tiswww.cwru.edu/~chet/
- Arithmetic expansion with increments and output redirection, Ian Neal, 2019/04/23
- Re: Arithmetic expansion with increments and output redirection, Robert Elz, 2019/04/24
- Re: Arithmetic expansion with increments and output redirection, Ian Neal, 2019/04/24
- Re: Arithmetic expansion with increments and output redirection, Greg Wooledge, 2019/04/24
- Re: Arithmetic expansion with increments and output redirection, Andreas Schwab, 2019/04/24
- Re: Arithmetic expansion with increments and output redirection,
Chet Ramey <=
- Re: Arithmetic expansion with increments and output redirection, Chet Ramey, 2019/04/24
- Re: Arithmetic expansion with increments and output redirection, Ian Neal, 2019/04/24
- Re: Arithmetic expansion with increments and output redirection, Chet Ramey, 2019/04/24
- Re: Arithmetic expansion with increments and output redirection, Ilkka Virta, 2019/04/24
- Re: Arithmetic expansion with increments and output redirection, Chet Ramey, 2019/04/24
- Re: Arithmetic expansion with increments and output redirection, Greg Wooledge, 2019/04/24
- Re: Arithmetic expansion with increments and output redirection, Ian Neal, 2019/04/24
- Re: Arithmetic expansion with increments and output redirection, Chet Ramey, 2019/04/24
- Re: Arithmetic expansion with increments and output redirection, Chet Ramey, 2019/04/24