I have a file with several blocks of text separated by a blank line. Ex.:
block1
block1
block2
block3
block3
I need a solution with sed, awk or perl that finds the first blank line and redirects the previous block to another file and so on until the end of the file.
I have this command in sed that locates the first block, but not the rest: sed -e '/./!Q'
Can anyone help me?