# print all lines from production.log matching the word "error", plus 1 additional line sed -n '/error/,+1p' production.log