Am 15.12.2012 01:10, schrieb David Champion: > This is good to add support for, but note that the ${a#b} and ${a%b} > family of parameter expressions is nonportable. These are commonly > accepted bashisms that also work in zsh, but not in xpg4 shells. > > Can you redo with seds, or something?
Come on, this was in the Single UNIX Specification Version 2 from 1997, and Solaris 10's /usr/xpg4/bin/sh groks it: $ uname -a SunOS somehost 5.10 Generic_142900-03 sun4u sparc SUNW,Ultra-5_10 $ /usr/xpg4/bin/sh -c 'a=foo ; echo ${a%oo}' f You may need to force the xpg4 shell to be used (bogofilter does that, read its *.a[cm] files if you need to know how, it's on sourceforge.net), but other than that, we should not waste any efforts on systems that violate 15-year-old standards.