[Top][All Lists]

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

Re: escaped sed metacharacters

From: Eric Blake
Subject: Re: escaped sed metacharacters
Date: Wed, 09 Sep 2009 19:26:45 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20090812 Thunderbird/ Mnenhy/

Hash: SHA1

According to Ralf Wildenhues on 9/9/2009 1:12 PM:
> rehashing the discussion here:
> <>
> * Eric Blake wrote on Mon, Aug 31, 2009 at 01:36:07PM CEST:
>> True.  I guess I'll find time to visit this patch, if no one beats me to it.
> Lemme try to beat you to it.  It seems that that a sweep over the
> documentation to remove ',' as sed 's' separator was not necessary,
> since we used constant regular expression strings mostly (as opposed
> to expanded shell variables containing files names or so).
> So I think this should document things appropriately.  Any further
> comments before I apply (tomorrow or so) and add Dave to THANKS
> (which email address should I use)?
> address@hidden rejects @samp{s/[^/]*$//}: use @samp{s,[^/]*$,,}.
> address@hidden rejects @samp{s/[^/]*$//}: use @samp{s%[^/]*$%%}.
> +Even escaped, patterns should not include separators that are also used

s/Even escaped/Even when escaped/

> +as @command{sed} metacharacters.  For example, GNU sed 4.0.9 rejects
> address@hidden,address@hidden,address@hidden,,}, while sed 4.1 strips the 
> backslash before the comma
> +before evaluating the basic regular expression.

Let others have a chance to reply, but I'm okay with the patch with just
that change.

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

Eric Blake             address@hidden
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


reply via email to

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