Topics

Shell

2 posts

Posts

grep or ripgrep

grep is on every Unix machine and handles one file at a time. ripgrep (rg) is built for a source tree: it walks directories in parallel, skips what .gitignore skips, and uses a regex engine that cannot go exponential. Both match lines against a pattern; the differences that matter are in what they search by default and how fast they get through a tree.