Sometimes I look at a long Unix pipeline and think, “I should do this in perl.” Other times, it is, “I bet I can do this all in sed.” So, here’s how to print just the lines of a file following a successful match in sed:
sed -n ':s; /^regexp$/{b l}; n; b s; :l; p; n; b l' file.txt
Lazyweb, is there a shorter way?