From c2069382350e79ce56d2271a9528a53b2067fdcc Mon Sep 17 00:00:00 2001 From: Marco Bonelli Date: Wed, 7 Aug 2019 07:32:59 +0200 Subject: [PATCH] envsubst: clarify examples and description (#3221) --- pages/common/envsubst.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pages/common/envsubst.md b/pages/common/envsubst.md index c8d84accf9..fa214f01d0 100644 --- a/pages/common/envsubst.md +++ b/pages/common/envsubst.md @@ -1,20 +1,20 @@ # envsubst -> Substitutes shell format strings with environment variables in text. -> Strings to be replaced should be in either `${var}` or `$var` format. +> Substitutes environment variables with their value in shell format strings. +> Variables to be replaced should be in either `${var}` or `$var` format. -- Replace environment variables in stdin and output to `stdout`: +- Replace environment variables in `stdin` and output to `stdout`: `echo '{{$HOME}}' | envsubst` - Replace environment variables in an input file and output to `stdout`: -`envsubst < {{path/to/input}}` +`envsubst < {{path/to/input_file}}` - Replace environment variables in an input file and output to a file: -`envsubst < {{path/to/input}} > {{path/to/output}}` +`envsubst < {{path/to/input_file}} > {{path/to/output_file}}` -- Replace environment variables in input from a space-separated list: +- Replace environment variables in an input file from a space-separated list: -`envsubst {{variables}} < {{path/to/input}}` +`envsubst '{{$USER $SHELL $HOME}}' < {{path/to/input_file}}`