Envsubst用shell格式字符串中的值替换环境变量。要替换的变量应位于${var}或$var格式。123456789101112替换环境变量stdin输出到stdout:echo '$HOME' | envsubst将输入文件中的环境变量替换为stdout:envsubst < path/to/input_file将输入文件中的环境变量替换为文件,并将其输出到新文件中:envsubst < path/to/input_file > path/to/output_file用空格分隔的列表,替换输入文件中的环境变量:envsubst '$USER $SHELL $HOME' < path/to/input_fileenvsubst '$USER $SHELL $HOME' < xxx.yaml > xxxx1.yaml