On Sun, Dec 11, 2022 at 08:06:24PM -0500, Rob Whitlock wrote: > On line 408, fw_update has the expression ${LOCALSRC:#file:}. The parameter > substitution ${name:#word} is not documented in the manual page for ksh yet > its behavior seems to be equivalent to ${LOCALSRC#file:}. Assuming this is > a typo, a patch is provided to remove the colon. If it is not a typo, could > someone explain what this syntax does? > > Is this was a typo however, and this parameter substitution is not > officially supported, why did ksh not complain?
I would guess syntax ${name:#word} is akin to other colon substitutions ${name:-word}, ${name:=word}, ${name:+word}, ${name:?word} although it is not documented. ${name:%word} works too (and is not documented either) And actually man page says that colon can be omitted from :- := :+ :? which hints that # and % are treated as substitutions with omitted colon. I wonder if we would rather update man page of ksh. -Kastus