Let's assume I have a log file that contains exceptions as shown
java.lang.NullPointerException blabla ABC.Exception blalabbla dogchacecat.Exception yadayada
I want to be able to output each line from beginning and up until (including) "Exception"
java.lang.NullPointerException ABC.Exception dogchacecat.Exception
How do I do this using any GNU tool (grep, awk, sed)? Thank you!