m4

This command takes an input file and substitutes strings inside it with the parameters passed. Here is an example input file:

cat temp
The COLOR fox jumped over the TYPE fence.

If we want to substitute "COLOR" by "brown" and "TYPE" by "broken", we can use:

m4 -DCOLOR=brown -DTYPE=broken temp
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License