| ENVSUB(1) | General Commands Manual | ENVSUB(1) |
envsub —
environment variable preprocessor
envsub |
[var ...] |
The envsub preprocessor substitutes
percent (“%”) delimited environment variables with their
values. To escape a variable, use two percent signs.
By default, all defined variables are expanded. If var arguments are provided, restrict to the named variables.
The envsub utility exits 0 on
success, and >0 if an error occurs.
Expand VERSION and PREFIX in script:
$ VERSION=0.1.0 envsub VERSION PREFIX
< scriptPrint “%V%: xyz”:
$ echo '%%V%%: %V%' | V=xyz
envsubJacob R. Edwards <jacob@jacobedwards.org>
| February 17, 2026 | jacob |