I have the need to take a text file, and issue a command (for use in a script) which will automatically remove all the lines before (or after) a certain point in the text file. Example.
If the file constained FooFooFoo Fido BarBarBar, I could say, don't output anything until you see 'Fido' and then just output the file (which could be redirected to an output file). The result would be, BarBarBar (or possibly Fido BarBarBar)
Or I could say, output everything, until you see 'Fido', then stop (yielding FooFooFoo or possibly FooFooFoo Fido)
I'm sure this must be possible, but I can't see how to do it. Any ideas gratefully received.