Skip to main content 7nolikov | Dmitrii Novikov

Grep by example

An interactive guide to grep - every example runs in the browser, so you try the flag instead of reading about it.

Worth an hour even if you have used grep for a decade. The parts most people never learned: -o to print only the match, -A/-B/-C for context lines, -r with --include, and when to reach for -P instead of fighting basic regex syntax.

Same author has one for ripgrep, which is the same idea and much faster on large trees.

antonz.org/grep-by-example

See also: