Manual Page Search Parameters

ENVSUB(1) General Commands Manual ENVSUB(1)

envsubenvironment 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 < script

Print “%V%: xyz”:

$ echo '%%V%%: %V%' | V=xyz envsub

environ(7)

Jacob R. Edwards <jacob@jacobedwards.org>

February 17, 2026 jacob