---

LinuxFocus: Building text files with m4 macros

This tutorial describes how to ease the maintenance of text
or HTML files, using the m4 macro processor.

“A macro command language is often needed when using a text
editor. Most of them already have such languages among their
features. Even the C compiler provides such a facility for
programmers throught the C preprocessor CPP. When it is used to
maintain configuration files or a small web site, the GNU/m4 macro
processor can efficiently reduce work load. The GNU/m4 macro
processor is part of all linux distributions and is a standard
among Unix users.”

“In the following, we show how to use the GNU/m4 macro processor
to maintain a set of HTML pages for a small web site. This system
will help to keep the whole site coherent. Of course, there are
dozens of ways to obtain the same result with Unix tools; that’s
the beauty of Unix.”


Complete Story

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis