Simple pre-processing text

Ben Pfaff blp@cs.stanford.edu
28 Sep 2001 10:50:38 -0700


Edward Glowacki <glowack2@msu.edu> writes:

> What is the "right way" to include files in-line in a document,
> i.e. take an input file that contains commands like "<input
> file='chapter1.xml'>" or "#include 'chapter1.txt'" and generate
> one large file from all the smaller pieces?  It would be really
> easy to write in PERL, but I have this feeling that there's a more
> elegant solution out there already...

You could write the file in m4.  That would give you a lot more
preprocessing power, too.  (Be sure to use GNU m4's -P option to
avoid unwanted expansions, though.)  If you *just* want the
ability to include files, though, write a little Perl program.
-- 
"I didn't say it was your fault.
 I said I was going to blame it on you."