I need help in "grepping" out lines beginning from "TEST FILE" to ";". I'm open to any other approach such as awk
FILE A contains the following:
TEST FILE ABC
this file contains ABC;
TEST FILE DEF
this file contains DEF
;
TEST FILE (DEF) this file contains (DEF);
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want the following 5 files
File1
TEST FILE ABC
this file contains ABC;
File2
TEST FILE DEF
this file contains DEF
;
File3
TEST FILE (DEF) this file contains (DEF);
File4
TEST FILE DGHT this file contains DGHT;
File5
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;