On Wed, Sep 28, 2005 at 10:38:31PM -0400, Igor Pechtchanski wrote: > On Wed, 28 Sep 2005, Nicholas Wourms wrote: > > unpack() { > > winbase=`cygpath -m ${srcdir}` > > Ahem, > > winbase="`cygpath -m "${srcdir}"`" >
Ahem, quote from the autoconf manual: ------8<------ 10.5 Shell Substitutions ======================== Contrary to a persistent urban legend, the Bourne shell does not systematically split variables and back-quoted expressions, in particular on the right-hand side of assignments and in the argument of `case'. For instance, the following code: case "$given_srcdir" in .) top_srcdir="`echo "$dots" | sed 's,/$,,'`" *) top_srcdir="$dots$given_srcdir" ;; esac is more readable when written as: case $given_srcdir in .) top_srcdir=`echo "$dots" | sed 's,/$,,'` *) top_srcdir=$dots$given_srcdir ;; esac and in fact it is even _more_ portable: in the first case of the first attempt, the computation of `top_srcdir' is not portable, since not all shells properly understand `"`..."..."...`"'. Worse yet, not all shells understand `"`...\"...\"...`"' the same way. There is just no portable way to use double-quoted strings inside double-quoted back-quoted expressions (pfew!). ------8<------ Cheers, Peterr