``` $ ksh -c 'echo "${a/#foo/$bar}"' #foo/$bar $ ksh -c 'echo "${a/%foo/$bar}"' %foo/$bar ``` Expected: an empty line of output. See also how `$var` was not expanded. Same for empty arrays: ``` $ ksh -c 'typeset -a a=(); echo "${a[@]/#foo/$bar}"' #foo/$bar ```
Expected: an empty line of output. See also how
$varwas not expanded.Same for empty arrays: