GNU bug report logs -
#27916
sed is limited to 24 patterns when using the delete command
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
You're right, my bad.
On Thu, Aug 3, 2017 at 7:58 AM, Assaf Gordon <assafgordon <at> gmail.com> wrote:
> Hello,
>
> from a cursory look:
>
> On 08/02/2017 07:35 AM, jean-christophe manciot wrote:
> > *With 25 patterns, sed fails to filter 'build-aux*':
> > root <at> samsung-ubuntu:/home/actionmystique/src# find -L -path
> > './*/build-*.sh' 2>/dev/null | sed -E '/.*ExpressVPN/client\..*$/d;
> > /\.gd.*$/d; /.*git-Tao_Te_eChing.*$/d; /.*\.gnupg.*$/d;
> [...]
>
> Could it be that this 25th pattern that you've added (as the first
> sed command) has an un-escaped slash, which messes up the rest of the
> patterns ?
>
> That is, the sed command "/.*ExpressVPN/client\..*$/d;'
> actually means: match lines with "ExpressVPN",
> then "c" (change) the lines to "lient\n..*$d/;".
>
> Example:
>
> $ echo "ExpressVPN" | sed -E '/.*ExpressVPN/client\..*$/d;'
> lient..*$/d;
>
> And, if this is the first pattern, then all the rest of the text
> is treated as the same line to change, and not as additional sed
> patterns:
>
> $ echo "ExpressVPN" | sed -E '/.*ExpressVPN/client\..*$/d;
> /Anything Else/d'
>
> lient..*$/d; /Anything Else/d
>
>
> This is a just a quick guess, I haven't been able to reproduce
> what you're seeing otherwise.
>
> regards,
> - assaf
>
>
--
Jean-Christophe
[Message part 2 (text/html, inline)]
This bug report was last modified 7 years and 294 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.