Zest.

Bash: grep recursively

A short, tested Bash example for grep recursively. Copy it and adjust the names and paths for your project.

Bash
grep -rn "pattern" .                  # recursive, with line numbers
grep -rni "pattern" --include="*.py" .
grep -rl "pattern" .                  # only file names
grep -v "pattern" file                # lines that do NOT match

Find it in Zest

Search for “bash grep recursively” in Zest and this example appears above the results, with other matches to choose from. Searches stay private.

More Bash examples

All Bash examples