[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#44983: Truncate long lines of grep output
From: |
Juri Linkov |
Subject: |
bug#44983: Truncate long lines of grep output |
Date: |
Thu, 10 Dec 2020 10:06:53 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> Also see this:
> ,----
> | grep -oE '.{0,20}jQuery.{0,20}' bootstrap.min.js
> `----
But what if the user enters such a regexp as "abc|xyz",
then it will be composed into such command:
grep -oE '.{0,20}abc|xyz.{0,20}'
that matches either 20 characters before "abc", or 20 characters
after "xyz". Then needs to add parentheses:
grep -oE '.{0,20}(abc|xyz).{0,20}'
What is worse is that the whole match is highlighted,
including 20 characters before and after the real match.
So it seems this solution is not perfect.
- bug#44983: Truncate long lines of grep output, (continued)
- bug#44983: Truncate long lines of grep output, Dmitry Gutov, 2020/12/06
- bug#44983: Truncate long lines of grep output, Juri Linkov, 2020/12/06
- bug#44983: Truncate long lines of grep output, Dmitry Gutov, 2020/12/06
- bug#44983: Truncate long lines of grep output, Juri Linkov, 2020/12/08
- bug#44983: Truncate long lines of grep output, Dmitry Gutov, 2020/12/08
- bug#44983: Truncate long lines of grep output, Juri Linkov, 2020/12/09
- bug#44983: Truncate long lines of grep output, Dmitry Gutov, 2020/12/09
- bug#44983: Truncate long lines of grep output, Juri Linkov, 2020/12/10
- bug#44983: Truncate long lines of grep output, Dmitry Gutov, 2020/12/10
- bug#44983: Truncate long lines of grep output, Jean Louis, 2020/12/09
- bug#44983: Truncate long lines of grep output,
Juri Linkov <=
- bug#44983: Truncate long lines of grep output, Jean Louis, 2020/12/10
- bug#44983: Truncate long lines of grep output, Juri Linkov, 2020/12/12
- bug#44983: Truncate long lines of grep output, Eli Zaretskii, 2020/12/13
- bug#44983: Truncate long lines of grep output, Jean Louis, 2020/12/13
- bug#44983: Truncate long lines of grep output, Juri Linkov, 2020/12/13
- bug#44983: Truncate long lines of grep output, Eli Zaretskii, 2020/12/14
- bug#44983: Truncate long lines of grep output, Dmitry Gutov, 2020/12/14
- bug#44983: Truncate long lines of grep output, Jean Louis, 2020/12/13
- bug#44983: Truncate long lines of grep output, Juri Linkov, 2020/12/24
- bug#44983: Truncate long lines of grep output, Dmitry Gutov, 2020/12/24