It looks like using ${var/pattern} causes some changes in field-
splitting and whitespace-trimming behavior, even in the (presumably)
no-op case of ${*/}:

$ set -- ' 1 ' ' 2 '

$ IFS=; printf '<%s>' ${*} ${*/}
< 1 >< 2 >< 1  2 >

$ IFS=; printf '<%s>' ${@} ${@/}
< 1 >< 2 >< 1  2 >

$ unset IFS; a=${*} b=${*/}; printf '<%s>' "$a" "$b"
<1 2>< 1   2 >

$ unset IFS; a=${@} b=${@/}; printf '<%s>' "$a" "$b"
< 1   2 ><1 2>

Reply via email to