bug-sed
[Top][All Lists]
Advanced

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

bug#27916: sed is limited to 24 patterns when using the delete command


From: jean-christophe manciot
Subject: bug#27916: sed is limited to 24 patterns when using the delete command
Date: Thu, 3 Aug 2017 11:00:59 +0200

You're right, my bad.

On Thu, Aug 3, 2017 at 7:58 AM, Assaf Gordon <address@hidden> 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*':
> > address@hidden:/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


reply via email to

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