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 [email protected] http://cnswww.cns.cwru.edu/~chet/