企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[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" ```