多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] ## 方式一: 使用 envsubst ``` > export username=idcpj > cat a.bash echo "pwd is ${PWD}" echo "username is ${username}" > cat a.bash| envsubst > b.bash echo "pwd is /Users/idcpj/Downloads" echo "username is idcpj" ``` ## 方式二:纯原生 ``` > export username=idcpj > cat c.bash cat > d.bash << EOF echo "pwd is ${PWD}" echo "username is ${username}" EOF > bash c.bash > cat d.bash echo "pwd is /Users/idcpj/Downloads" echo "username is idcpj" ```