Tag Archives: Grep

Grep lines before and after matched line

The command grep is really useful for finding matches of a certain word in files or streams. However, until recently I didn’t know how to display lines before and after the matched line(s). Let’s say we have a file named … Continue reading

Posted in programming | Tagged | 1 Comment