Are there any tools to do what I want already? I'd like to split the file 'one' at lines starting with @, followed by a filename:
$ cat one
@header
-- header --
@body
-- body --
@body isn't a split point
@footer
-- footer --
$ splitit one
$ ls
body footer header one
$ cat header
-- header --
$ cat body
-- body --
@body isn't a split point
$ cat footer
-- footer --
What is splitit?
Use case:
- edit my html, js, css and docs in the one file (the files aren't large)
- m4 preprocesses the one file
- splitit reads m4 output and writes out several files
- indent/beautify the files
- recombine into fewer files with cat...