Well the question is answered but I think it's worth mentioning the command written to do precisely this.
csplit!
csplit -s -n 5 -f dbexport. '/^-- Current Database: /' '{*}' dbexport
adjust -n 5 and 'dbexport.' to taste.
hmmm csplit has slightly bizarre option syntax.
Maybe you're better off with awk after all :-)
or perl
Matt
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
