View previous topic :: View next topic |
Author |
Message |
Punchcutter Guru
Joined: 11 Feb 2007 Posts: 358
|
Posted: Mon Oct 07, 2024 9:23 pm Post subject: Why no ugrep in portage? |
|
|
I've just discovered this very old and powerful utility, seemingly a drop-in replacement for standard grep with a lot more power:
https://ugrep.com/
Normally I would expect something like this to definitely be in the main portage tree. Any idea why it's not?
Is there some reason why this has been explicitly rejected for inclusion in Gentoo? Or is it just an accident
or coincidence that no one has stepped up to put it in and maintain it? |
|
Back to top |
|
|
arran4 n00b
Joined: 19 Sep 2003 Posts: 13 Location: Melbourne, Australia
|
|
Back to top |
|
|
Chiitoo Administrator
Joined: 28 Feb 2010 Posts: 2738 Location: Here and Away Again
|
Posted: Tue Oct 08, 2024 3:01 am Post subject: |
|
|
I can't tell from a quick-ish look if it's the same thing, but there was a bug offering it to be included, but it seems to have somewhat disappeared back when:
https://bugs.gentoo.org/107086 _________________ Kindest of regardses. |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2183
|
Posted: Tue Oct 08, 2024 9:57 am Post subject: |
|
|
Depending on the advantages you are after, there's also ripgrep and ripgrep-all packages in Gentoo. _________________ Greybeard |
|
Back to top |
|
|
Punchcutter Guru
Joined: 11 Feb 2007 Posts: 358
|
Posted: Thu Oct 10, 2024 10:49 pm Post subject: |
|
|
Thanks all... after posting this I discovered ripgrep(-all), and I think that's a better choice for my needs |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3470
|
Posted: Thu Oct 10, 2024 10:55 pm Post subject: |
|
|
Out of curiosity, how is it better than plain old grep, or what is it better for? _________________ Make Computing Fun Again |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2183
|
Posted: Fri Oct 11, 2024 8:14 am Post subject: |
|
|
I think it's faster, but the main advantage for me is replacement strings and references therein:
Code: | rg 'foo(pattern)bah' -r 'bah-$1-foo' wherever |
if I got that right, will output "bah-pattern-foo' for every occurrence of 'foopatternbah' in files below wherever. _________________ Greybeard |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3470
|
Posted: Fri Oct 11, 2024 9:15 am Post subject: |
|
|
I see. Well, I've just been using sed for this kind of more complex operations. Doesn't look much different: sed -n 's/foo\(pattern\)bah/bah-\1-foo/gp'
The whole appeal of grep is that it's a simple shortcut to a very frequently used command... Like: [G]lobally / [R]egular [E]xpression / [P]rint _________________ Make Computing Fun Again |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2183
|
Posted: Fri Oct 11, 2024 12:43 pm Post subject: |
|
|
Ah, but ripgrep does all that grep does, and saves two characters typing, as the command is rg instead of grep.
One difference between rg and grep - rg always searches a directory, so it's the same as "grep -r" _________________ Greybeard |
|
Back to top |
|
|
|