On Friday 17 February 2006 1:12 pm, Ralf Wildenhues wrote:
> > pwd_curdir="`$1`"
> > pwd_srcdir="`cd $srcdir && $1`"
>
> The double quotes are not necessary here.
Not just unnecessary, but positively harmful. Several shells will fail
to parse this correctly, *including* the MSYS version of b
Hi Keith,
* Keith Marshall wrote on Sat, Feb 18, 2006 at 11:26:30AM CET:
> On Friday 17 February 2006 1:12 pm, Ralf Wildenhues wrote:
> > > pwd_curdir="`$1`"
> > > pwd_srcdir="`cd $srcdir && $1`"
> >
> > The double quotes are not necessary here.
>
> Not just unnecessary, but positively harmfu
* Keith Marshall wrote on Sat, Feb 18, 2006 at 01:18:07PM CET:
> On Saturday 18 February 2006 10:51 am, Ralf Wildenhues wrote:
> >
> > Ouch. I was referring to the fact that, on the right hand side of
> > shell assignments, no word splitting is done. So
> > foo=`echo bar baz`
> >
> > will assig
On Saturday 18 February 2006 10:51 am, Ralf Wildenhues wrote:
> * Keith Marshall wrote on Sat, Feb 18, 2006 at 11:26:30AM CET:
> > On Friday 17 February 2006 1:12 pm, Ralf Wildenhues wrote:
> > > > pwd_curdir="`$1`"
> > > > pwd_srcdir="`cd $srcdir && $1`"
> > >
> > > The double quotes are not n
On Saturday 18 February 2006 12:53 pm, Ralf Wildenhues wrote:
> I'm sorry, but please be more precise and quote which part of the node
> you mean. I cannot find this exact bug described there (CVS Autoconf).
>From autoconf-2.59
|File: autoconf.info, Node: Shell Substitutions, Next: Assignments,
Keith Marshall writes:
>
> From autoconf-2.59
> |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 `"`...\"...\
On Saturday 18 February 2006 12:53 pm, Ralf Wildenhues wrote:
> > > Could you confirm that the bug also exists with assignments?
> >
> > I'm not sure. I'd never actually encountered the problem with bash,
> > before this particular MSYS bug report. However, I had previously
> > encountered it in
On Saturday 18 February 2006 3:38 pm, Ralf Wildenhues wrote:
> I have tried the MSYS shell now. I can reproduce the bug mentioned in
> the URLs there, but not on Cygwin, neither with bash on any other
> system I could find, nor with /bin/sh on FreeBSD 5.4, OpenBSD 3.8, AIX
> 4.3.3 HP-UX 10.20, IRI
Keith Marshall <[EMAIL PROTECTED]> writes:
> Where is it *ever* necessary? The backticks themselves serve as quotes.
This is wrong. The expansion of a command substitution is subject to word
splitting and filename expansion, unless quoted. Especially the latter is
most serious.
> A string suc
Keith Marshall <[EMAIL PROTECTED]> writes:
> Nevertheless, it does seem that avoiding backquoted expressions within
> double quotes where possible, can lead to more robust and portable
> scripts.
I disagree. Not quoting the output of a command substitution is a bug
waiting to happen.
Andreas.
10 matches
Mail list logo