New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments for Using Awk to beautify grep searches #1282
Comments
ripgrep author here. Note that this blog post contains some false information and some misconceptions. First and foremost, you absolutely do not need a Rust compiler to use ripgrep. You don't need to install Rust at all, in fact. As the README for ripgrep says, you can download binary releases of ripgrep for Linux, Mac or Windows. (There are no binaries available for FreeBSD, on which you would need to compile ripgrep.) Secondly, I didn't set out to write ripgrep because "oooo new and shiny." That's a pretty dramatic underselling of my motivation and the work I put into it. I set out to write it because I cared about all the same things you did: presentation, retrieval, and of course, improving the state of the art. It wasn't about shaving off a few hundred milliseconds here and there. It was about turning searches that take minutes with ack or grep into seconds. You can see benchmarks for such things on my blog post introducing ripgrep. Thirdly, tools like ripgrep and ag advertise a key feature that you've left out here: they respect your Believe it or not, the developers of these tools weren't ignorant of tools like GNU grep. We learned from it and set out to try to improve it. I think we've succeeded. Will some people not need the improvements? Of course! But let's just be honest about that instead of waxing poetic about how old software is Good and new and shiny software is Bad. |
Andrew, I might not have been clear enough in the blog post about how much respect I have for the work you and other authors of similar projects have done! It's clear to me, that the tools you built have their place and in many cases are invaluable. I can imagine code repositories so big that - like you pointed out - take minutes to search through. My point isn't that we don't need projects like yours. It's that in most cases the needs we have are already covered and that we might not know about it. That was my humble case. I was using ripgrep myself and was very happy with it. I didn't know much about using awk not too long ago and the blog post arose from me learning how to get the similar looking results with the tools I always had. I just realized that I didn't know a lot of what Unix gives us and that for the most part - it is just enough. I strongly encourage everyone reading this conversation to:
P.S |
Kamil, That's fair. I definitely agree with everything you've said here. As the author of one of those tools, I totally admit to being a bit sensitive to the "new and shiny" criticism, because it just seems a bit too dismissive to me. We should seek to improve upon old tools, and if the only thing standing in your way of using them is accessibility, then we should make them more accessible. :-) That's a long and hard fight though!
|
You may be interested in sgrep: https://www.cs.helsinki.fi/u/jjaakkol/sgrepman.html At some point, it was included in either RedHat or perhaps Fedora later, but no longer. Perhaps it could still be built from an older SRPM. |
Hi Richard, sgrep looks very interesting - I can see that it is in MacPorts - Thank you for sharing! |
As 99% of what I use projects for is in |
This script saved my bacon! :) Thank you for the detailed explanation and the script. I did have an issue when using A, B, C switches with grep to display lines, before and after, and the : between filename and line numebr was a dash. Example below. filename-112:string I was not able to make sense of your 'sed' comment in the final paragraph in the post, but I did use regex in the FS to check for either : or -. Works! 👍 FS="[:-]" Thanks |
This was a lifesaver, thanks for writing this 🔥 grep -nir --color=always --exclude-dir={_site,.git,.github,node_modules} |
Comments for https://www.endpointdev.com/blog/2017/01/using-awk-to-beautify-grep-searches/
By Kamil Ciemniewski
To enter a comment:
The text was updated successfully, but these errors were encountered: