Kolam Ayer MakersLinux Foundations

grep

Use

grep -R makers ~/src/pages

What It Does

grep prints lines that match text or a regular expression pattern.

Practice

Use grep -n word file to show line numbers and grep -R word directory to search recursively.

Use anchors when position matters:

grep '^#' ~/src/pages/index.md

Watch Out

Quote patterns that contain spaces or shell characters.

Docs Pointers