I have a simple text file and I want to split it into 2 parts whenever I see 3 (or more) consecutive new lines. For example:
Fiona Gallagher
Frank Gallagher
Sheila Jackson
Dominique Winslow
Kermit
Should create 2 text files:
Fiona Gallagher
Frank Gallagher
Sheila Jackson
and
Dominique Winslow
Kermit
Though similar posts in SO address the problem of splitting text files into 2 parts (this PHP solution, this C# solution, and this Java solution) I could not find a solution in bash. It seems reasonable enough that a neat bash solution is out there somewhere (?). Thanks!