[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: command substitution inside parameter expansion inside "for ((;;))"
From: |
Chet Ramey |
Subject: |
Re: command substitution inside parameter expansion inside "for ((;;))" |
Date: |
Wed, 15 Nov 2017 11:37:36 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 11/15/17 5:13 AM, Stephane Chazelas wrote:
> I also noticed that cmd was not run in ${x#`cmd`} if x happens
> to be empty (it's also the case in dash and ksh93 though only if
> x is unset; zsh, mksh and yash are fine)
It looks like bash/dash/ksh93 give more weight to the "If word is not
needed, it shall not be expanded" part of the standard; more than the
"The word shall be expanded to produce a pattern" text in the description
of the pattern removal word expansions.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/