【发布时间】:2023-03-07 03:27:01
【问题描述】:
# input file.yaml
conda_name: "test"
user_name: "foo"
如何获取 user_name 变量并导出到本地环境变量(无需安装额外的软件包)?我不知道如何导出变量
# where I am stuck
grep 'user_name:' file.yaml | sed 's/:/=/g'
# export the variable
请随意使用您认为最好的方法。 谢谢!
【问题讨论】: