ripgrep
what is ripgrep
ripgrep is a command line program to find text of all files in a dir. Supposedly the fastest one.
is ripgrep speed worth it?
- Ok. Decided, ripgrep has no use to me.
- When u search thousands of files, let's just say 5 thousand, the bottle neck is disk loading.
- That's some 10 or 100 times than whatever the grep's speed.
- Even on a flash drive.
- This means, ripgrep, has no benefit for vast majority of users.
- This is the MOST important thing to know.
- Ripgrep, became popular, only because the drama of speed, like the unix and c fucks and only among these type of people. A fringe group. And among rust fanatics. Cuz it's written in rust.
- If u are actually google, dealing with millions of files and code, then sure, ripgrep makes a diff.
- Else, no.
lol. got the ripgrep author sulky and replied to my post
ripgrep vs ugrep, which is faster
lol, there is some disagreement on which is faster
can ripgrep do replace?
lol. for some odd reason, he's adamant about not adding replace text feature.
- There's some idiosyncrasy i think. Fear of failure.
- The suggested solution, of piping to sed with grep again. That's a lol in ripgrep's face. Lol, the fastest grep, but u need to run it twice!
- Also, find and replace is the MOST natural task TOGETHER. It's like saying cup and handle should be seperate tools.
- ANY facking shell tool worth the name, has find, and replace, operators or functions. It is part of regex.
- WHAT a uncanny behavior, to add a -replace option in ripgrep, yet, for report purposes only. Lol
fastmod for find replace
if you need find and replace, seems
fastmod is a new choice.
replacing
sed
.
https://github.com/facebookincubator/fastmod
turns out, fastmod is not interesting, because it does interactive yes/no. emacs does this some 20 years ago. Emacs: Interactive Find Replace Text in Directory
ripgrep vs xah find go
i have written grep and sed in many programing languages over the past 20 years.
- Python: Find Replace Text in Dir
- Python: Find Replace Regex in Dir
- Perl: Find Replace String Pairs in Directory
- WolframLang: Find/Replace Script
- Emacs: Xah Find Replace (xah-find.el)
ripgrep is about 2 times faster than xah find go. searching over 7k files on a simple word. (but filtering over about 20k files. only about 7k of them are target suffix .html)