autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Avoid unportable nested double-quotes and backquotes.


From: Ralf Wildenhues
Subject: Re: Avoid unportable nested double-quotes and backquotes.
Date: Tue, 22 Jun 2010 20:08:38 +0200
User-agent: Mutt/1.5.20 (2010-04-22)

Let's update the Autoconf manual.  OK?

Thanks,
Ralf

    Clarify nested double-quotes and backquotes shell issues.
    
    * doc/autoconf.texi (Shellology): New anchor for pdksh.
    (Shell Substitutions): Link to it for escaped double-quotes
    within double-quoted backquotes; add ksh example for unescaped
    inner double-quotes problem.

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 4dfde1d..4def62d 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -14626,6 +14626,7 @@ Shellology
 
 @item Pdksh
 @prindex @samp{pdksh}
address@hidden
 A public-domain clone of the Korn shell called @command{pdksh} is widely
 available: it has most of the @samp{ksh88} features along with a few of
 its own.  It usually sets @code{KSH_VERSION}, except if invoked as
@@ -15139,9 +15140,18 @@ Shell Substitutions
 @noindent
 and in fact it is even @emph{more} portable: in the first case of the
 first attempt, the computation of @code{top_srcdir} is not portable,
-since not all shells properly understand 
@code{"address@hidden"@dots{}"@dots{}`"}.
+since not all shells properly understand 
@code{"address@hidden"@dots{}"@dots{}`"},
+for example Solaris 10 ksh:
+
address@hidden
+$ @kbd{foo="`echo " bar" | sed 's, ,,'`"}
+ksh: : cannot execute
+ksh: bar | sed 's, ,,': cannot execute
address@hidden example
+
address@hidden
 Worse yet, not all shells understand @code{"address@hidden"@dots{}\"@dots{}`"}
-the same way.  There is just no portable way to use double-quoted
+the same way (@pxref{pdksh}).  There is just no portable way to use 
double-quoted
 strings inside double-quoted back-quoted expressions (pfew!).
 
 @table @code



reply via email to

[Prev in Thread] Current Thread [Next in Thread]