libtool-patches
[Top][All Lists]
Advanced

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

Re: HEAD: func_quote_for_expand and Solaris 2.6 /bin/sed


From: Eric Blake
Subject: Re: HEAD: func_quote_for_expand and Solaris 2.6 /bin/sed
Date: Sat, 24 Feb 2007 06:58:27 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Ralf Wildenhues on 2/8/2007 2:32 PM:
> | # Re-`\' parameter expansions in output of double_quote_subst that were
> | # `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
> | # in input to double_quote_subst, that '$' was protected from expansion.
> | # Since each input `\' is now two `\'s, look for any number of runs of
> | # four `\'s followed by two `\'s and then a '$'.  `\' that '$'.  Note
> | # that the embedded single quotes serve only to enhance readability.
> | sed_double_backslash='s/^\(\(''\\\\''\\\\''\)*''\\\\''\)\$/\1\\$/;
> |                 s/\([[^\\]]\(''\\\\''\\\\''\)*''\\\\''\)\$/\1\\$/g'
> 
> (note the doubled [[]] due to M4 quoting).

Resurrecting an old thread for a somewhat unrelated question, is there any
reason you can't use a style with the scope of m4 double-quoting widened,
so that shell code is then copy-n-pastable, as recommended by Bruno
Haible?  As in:

| [[
| # Re-`\' parameter expansions in output of double_quote_subst that were
| # `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
| # in input to double_quote_subst, that '$' was protected from expansion.
| # Since each input `\' is now two `\'s, look for any number of runs of
| # four `\'s followed by two `\'s and then a '$'.  `\' that '$'.  Note
| # that the embedded single quotes serve only to enhance readability.
| sed_double_backslash='s/^\(\(''\\\\''\\\\''\)*''\\\\''\)\$/\1\\$/;
|                 s/\([^\\]\(''\\\\''\\\\''\)*''\\\\''\)\$/\1\\$/g'
| ]]

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF4ESD84KuGfSFAYARAlUcAKC6bALRln9Viq/HcA03/H6XLl9JCACeOqS7
pribgU6a2MJvnfvw5UTeM6M=
=0Imj
-----END PGP SIGNATURE-----




reply via email to

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