Re: How to replace with `$1` literally?

Marc Chantreux <[email protected]> Mon, 8 Aug 2016 13:17:31 +0200
Newsgroups gmane.comp.gnu.m4.general
Message-ID <[email protected]>
hello,

> The thing to replace ENV might be read from a file.
> m4 -D ENV=$(< file) << ENV

it is a good practice to quote substitutions to avoid
unexpected behaviors.

risky :    m4 -D ENV=$(< file)   << ENV
better:    m4 -D ENV="$(< file)" << ENV

> How to escape the content of file so that the content of file will be used
> to replace ENV literally?

AFAIK: you can't. but i'm really an m4 rookie and i'm pretty sure some
else will come to rescue.

regards
marc