[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FYI: fix dollar handling in func_quote_for_expand [libtool--devo--1.
From: |
Gary V. Vaughan |
Subject: |
Re: FYI: fix dollar handling in func_quote_for_expand [libtool--devo--1.0--patch-265] |
Date: |
Fri, 22 Oct 2004 10:07:21 +0100 |
User-agent: |
Mozilla Thunderbird 0.8 (Macintosh/20040913) |
Hi Noah!
Noah Misch wrote:
On Fri, Oct 22, 2004 at 09:19:11AM +0100, Gary V. Vaughan wrote:
Nope, there can be only one ^ anchored match :-)
sed is a line based tool, so the g refers to multiple occurences on
each line:
Gaah, you're absolutely right. It's too early :-)
I borrowed a colleague's Mac OS X 10.3.5 box and could not reproduce the \]
problem. This was the test command:
echo 'fo\o' | sed 's/[\]/B/g'
=> foBo
What command fails on your box?
You're right, it works fine from the shell command line. I think the
problem must have been it's interaction with m4 [ and ] quotes as
general.m4sh was expanded.
Looking again, I see that your original mail had this expression:
sed_double_backslash='s/\(\(^\|[^\]\)\(\\\\''\\\\''\)*\)''\\\\''\$/\1\\\\''\\''\$/g'
So m4 would reduce that to:
sed_double_backslash='s/\(\(^\|^\\)\(\\\\''\\\\''\)*\)''\\\\''\$/\1\\\\''\\''\$/g'
And the parentheses would no longer match due to escaping.
[ The possibly extraneous \ does not bother me, but the specific failure should
probably receive mention in Shellology. ]
I haven't retested, and I'm going to leave the escaped \ in for now
since it seems to be working correctly, but I agree that a single \
should work equally well after all.
Cheers,
Gary.
--
Gary V. Vaughan ())_. address@hidden,gnu.org}
Research Scientist ( '/ http://tkd.kicks-ass.net
GNU Hacker / )= http://www.gnu.org/software/libtool
Technical Author `(_~)_ http://sources.redhat.com/autobook
signature.asc
Description: OpenPGP digital signature
- FYI: fix dollar handling in func_quote_for_expand [libtool--devo--1.0--patch-265], Gary V. Vaughan, 2004/10/20
- Re: FYI: fix dollar handling in func_quote_for_expand [libtool--devo--1.0--patch-265], Noah Misch, 2004/10/20
- Re: FYI: fix dollar handling in func_quote_for_expand [libtool--devo--1.0--patch-265], Gary V. Vaughan, 2004/10/21
- Re: FYI: fix dollar handling in func_quote_for_expand [libtool--devo--1.0--patch-265], Noah Misch, 2004/10/22
- Re: FYI: fix dollar handling in func_quote_for_expand [libtool--devo--1.0--patch-265], Gary V. Vaughan, 2004/10/22
- Re: FYI: fix dollar handling in func_quote_for_expand [libtool--devo--1.0--patch-265], Noah Misch, 2004/10/22
- Re: FYI: fix dollar handling in func_quote_for_expand [libtool--devo--1.0--patch-265], Gary V. Vaughan, 2004/10/22
- Re: FYI: fix dollar handling in func_quote_for_expand [libtool--devo--1.0--patch-265], Noah Misch, 2004/10/22
- Re: FYI: fix dollar handling in func_quote_for_expand [libtool--devo--1.0--patch-265],
Gary V. Vaughan <=