Skip to main content

env-replace: un-expand environment variables for more compact output

Project description

env-replace

Pipe commands that produce lots of output through env-replace to replace expanded environment variables (especially prefix paths in build output) with the environment variables themselves.

Install:

python3 -m pip install env-replace

Usage:

export PREFIX="/super-long-prefix-path"
echo "cc -I$PREFIX/include -L$PREFIX/lib ..." | env-replace

reverses environment variable expansion so that the output is:

cc -I$PREFIX/include -L$PREFIX/lib ...

instead of

cc -I/super-long-prefix-path/include -L/super-long-prefix-path/lib ...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for env_replace, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size env_replace-1.1.0-py3-none-any.whl (4.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size env_replace-1.1.0.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page