From: Junio C Hamano Date: Fri, 03 Aug 2007 00:12:56 GMT Subject: Re: Shell script cleanups/style changes? Message-ID: <7vk5sdscfr.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <85ps25y1ac.fsf@lola.goethe.zz> David Kastrup writes: > Junio C Hamano writes: > >> However, there is a line we need to draw when bending bacwards for >> compatibility, and I think a system that does not have a working >> command substitution $( ... ) is on the other side of that line. > > Not an issue. But apparently, ${parameter#word} is for Solaris. I'd > still like to get confirmation that it is indeed /bin/sh, but if it > is, the current code is not good for Solaris. I happen to feel ${parameter#word} is more esoteric than $(cmd). If a system does not even do the latter, then avoiding the former to help such a system is a futile effort. And /bin/sh my Solaris box does not understand $(cmd) and wants you to say `cmd`. Of course % and # parameter substition do not work there. People could probably say SHELL_PATH=/usr/xpg4/bin/sh there to get a saner shell, even if they do not like bash, though.