Hello, On Tue, Jan 30, 2007 at 10:07:50AM +0000, martin f krafft wrote: > also sprach Alexander Gattin <[EMAIL PROTECTED]> [2007.01.30.0930 +0000]: > > ${parameter#word}, ${parameter##word}, > > ${parameter%word}, ${parameter%%word}, > > these are not bashisms.
I assume you know POSIX better than me, > > ${parameter/pattern/string} and ${parameter//pattern/string}), > > this is. Yes, and this is not a matter of the bug, because checkbashisms reports ${parameter/pattern/string} and ${parameter//pattern/string}, as I've already told. > > ${parameter:?error message} and ${parameter?error message} > > this is not. > > > ${!prefix*} and [EMAIL PROTECTED] > > this is. > > What shell is this you are using in Solaris and what reason so you > have to believe that it is POSIX compliant? [EMAIL PROTECTED]:~$ uname -a SunOS puma-a 5.9 Generic_118558-26 sun4u sparc SUNW,Sun-Fire shell that I've used is /usr/bin/sh, another, POSIX-compliant one is /usr/xpg4/bin/sh, here is output of the latter: [EMAIL PROTECTED]:~$ /usr/xpg4/bin/sh ./subst.sh ${PATH} = /usr/bin:/usr/local/ant/bin:/usr/local/bin ${PATH+/bin} = /bin ${PATH:+/bin} = /bin ${PATH-/bin} = /usr/bin:/usr/local/ant/bin:/usr/local/bin ${PATH:-/bin} = /usr/bin:/usr/local/ant/bin:/usr/local/bin ${PATH=/bin} = /usr/bin:/usr/local/ant/bin:/usr/local/bin ${PATH:=/bin} = /usr/bin:/usr/local/ant/bin:/usr/local/bin ${PATH?No PATH} = /usr/bin:/usr/local/ant/bin:/usr/local/bin ${PATH:?No PATH} = /usr/bin:/usr/local/ant/bin:/usr/local/bin ./subst.sh[11]: ${!P*}: bad substitution ./subst.sh[12]: [EMAIL PROTECTED]: bad substitution ./subst.sh[13]: ${PATH:1}: bad substitution ./subst.sh[14]: ${PATH:0:7}: bad substitution ${#PATH} = 42 ${PATH%%:*} = /usr/bin ${PATH%:*} = /usr/bin:/usr/local/ant/bin ${PATH#*:} = /usr/local/ant/bin:/usr/local/bin ${PATH##*:} = /usr/local/bin ./subst.sh[20]: ${PATH/local/loc}: bad substitution ./subst.sh[21]: ${PATH//local/loc}: bad substitution OK, looks like only ${!P*} and [EMAIL PROTECTED] need to be considered by checkbashisms. Do you agree? P.S. from practical point of view, I've seen a lot of troubles with Solaris' shell (/bin/sh) which passed unnoticed by checkbashisms. And I'd prefer them to be found/reported somehow, without need to check on target systems, maybe some tool like e.g. "checksolarisms", then? :) -- regards, xrgtn -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]