Use sed as a pattern filter.
Section: sed Line Deletion and Printing
Print only matching lines
bash
bash
sed -n '/ERROR/p' app.logExplanation
Suppress default output with `-n`, then explicitly print matches.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing sed Line Deletion and Printing