Daily Archives: July 1, 2022

Using AWK to print N lines up until the FIRST MATCH of a string and then exit

Often you are looking for a keyword within a log file but you need to print out X lines BEFORE the first match of a string, THEN exit the search. There are many ways to skin a cat, and here … Continue reading

Posted in Command Line FU | Leave a comment