Uncategorized Print Only Matched String Sed : I had a situation in which i had to print out the line before a line that did not match a pattern! Sed will match the first string, and make it as greedy as possible.