How should only the ERROR lines from app.log be written to a new error report?
ERROR
app.log
Search the filename itself for ERROR without reading its contents.
Use cat to copy every log line into the report.
cat
Append an empty line twice and leave out the source log.
Use grep with the ERROR pattern and redirect its output with > to error_report.txt.
grep
>
error_report.txt