Don't have Telegram yet? Try it now!
http://blog.amit-agarwal.co.in/2010/01/05/display-the-output-of-a-command-from-the-first-line-until-the-first-instance-of-a-regular-expression/
Display the output of a command from the first line until the first instance of a regular expression