Skip grep, use awk
ripgrep[1] is functionally incredibly similar to grep and ag, but is significantly faster[2] and supports a wider range of character encodings. In its short lifetime it has already become the default search tool for VSCode.<p>I've switched to using it as my daily driver for text search and am incredibly happy with it.<p>[1]: <a href="https://github.com/BurntSushi/ripgrep" rel="nofollow">https://github.com/BurntSushi/ripgrep</a><p>[2]: <a href="http://blog.burntsushi.net/ripgrep/" rel="nofollow">http://blog.burntsushi.net/ripgrep/</a><p>Edit: I confused awk with ag originally leading to this comment. Using ripgrep as a pre-filter to awk is still a ridiculous amount faster, especially on large trees, so while the OP's suggestion is cool I can't see myself reaching for it often.