[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: |
Assaf Gordon |
Subject: |
bug#27916: sed is limited to 24 patterns when using the delete command |
Date: |
Wed, 2 Aug 2017 23:58:02 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 |
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