Re:Notes on the M4 Macro Language (2008)
by e40 on Thursday May 19, 2022 @07:39PM
(#31441625)
I considered that just the other day. Ended up using cpp instead.
[ Parent
| on HN ]
Another simple option is envsubst which does one thing well.
I used envsubst when I can but as far as I know you cannot do loop using envsubst. When you use the c preprocessor or php, m4, etc..., you can.
Nah, that's what I meant. It does $-expansion and that's it. If you need conditionals and loop you need templates and macros like others are saying: m4, cpp, handlebars, whatever.
I use it as a low-brain template engine to do only that.