csplit

csplit#

Split a file into pieces by context patterns.

$ csplit -z file '/^---$/' '{*}'