Skip to content

Files

Latest commit

66ce4a4 · Oct 11, 2015

History

History
10 lines (7 loc) · 330 Bytes

only-show-the-matches.md

File metadata and controls

10 lines (7 loc) · 330 Bytes

Only Show The Matches

Tools like grep, ack, and ag make it easy to search for lines in a file that contain certain text and patterns. They all come with the -o flag which tells them to only show the part that matches.

This is particularly powerful when used with regex and piped into other programs.

h/t Dillon Hafer