Hi.
Using upper-case letters as the pattern, consider items 2 and 7 from list below:
Split a text file into pieces, i.e. groups of lines:
1) split, standard, but many variants exist in systems
split a file into pieces
2) csplit, standard
split a file into sections determined by context lines
3) r3split (local, Ratio, iRregular, Random,
specify numbers in groups, percentage, random set of lines)
4) pasplit (local, approximate, fast parallel-process split)
5) mmsplit (local, multi-method, by number of lines, groups, pattern))
6) scatter (local, regular number, like dealing a deck of playing cards)
7) ppt-split (local, csplit with perl patterns, Perl Power Tools)
https://github.com/briandfoy/PerlPowerTools/blob/master/bin/split
2016.08.02
8) split_at_colchange (missing-text/local, add empty line when column changes)
http://www1.cuni.cz/~obo/textutils/
9) gate (local, Group And Transfer Entries, into files by field pattern)
10) fsplit (local, split Fortran-77 into files by module name)
12) mfs (local, split Fortran routines into files by name, handles "module")
13) xsplit (local, explicit list of line numbers to files)
14) nsplit (local, into "s" parts - bytes, not lines)
15) bsplit (3rd/local, binary file with dd, originally named fsplit)
16) f90split (3rd/local, split Fortran-90 source)
Briefly:
...
pl " Results, csplit, second file:"
csplit --quiet --prefix=f -z $FILE '/^[A-Z]/' '{*}'
head f01
pl " Results, ppt-split, first file:"
ppt-split -p '^[A-Z]' $FILE
head x.aab
produces:
-----
Results, csplit, second file:
DROP
matt
sam
-----
Results, ppt-split, first file:
ADD
john
mickey
Best wishes ... cheers, drl