-----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 [EMAIL PROTECTED]
-----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-----