February 2004
Beginner
200 pages
5h 40m
English
m4 is a macro-processing language. It locates keywords within a file and substitutes values for them. For example, given this file:
$ cat myfile My name is NAME and I am AGE years old ifelse(QUOTE,yes,No matter where you go... there you are)
see what m4 does with substitutions for NAME, AGE, and QUOTE:
$ m4 -DNAME=Sandymyfile My name is Sandy and I am AGE years old $ m4 -DNAME=Sandy -DAGE=25myfile My name is Sandy and I am 25 years old $ m4 -DNAME=Sandy -DAGE=25 -DQUOTE=yesmyfile My name is Sandy and I am 25 years old No matter where you go... there you are