m4

Back

Usecases

Use file as template and populate with variables

Replace FOO in a file with BAR

m4 -DFOO=BAR <filename>

Conditionally create block

ifdef(`LINUX',
This logic is intended only for linux systems
,
This is the fallback logic)