m4 is a “macro processor”: a dry name that disguises a great facility. A macro-processor is basically a program that scans text looking for defined symbols, which it replaces by other text — or other symbols. Thus, it is a powerful general-purpose utility that can be used to automate many tasks people often end up doing in sed, awk, perl, or even their favourite text editor. However, this power and it’s general-purpose nature is not at all obvious in the bare name, “macro processor”. Also, Unix developers already have a built-in macro processor, in the form of the C pre-processor, built into their compiler. Perhaps it is this that accounts for m4’s relative neglect. Whatever, this article hopes to show all Unix users the power and usefulness of this software tool.
Link: dhs.org
Category:
- Linux