bash - 从命令填充的 Makefile 导出 bash 环境变量
问题描述
我正在尝试创建一个Makefile
将导出由命令填充的 bash 环境变量:
RESOUCE_GROUP=containerresourcegroup
STORAGE_ACCOUNT=mycontainerstorage
SHARE_NAME=containers
do:
AZURE_STORAGE_CONNECTION_STRING=$(shell az storage account show-connection-string --resource-group ${RESOUCE_GROUP} --name ${STORAGE_ACCOUNT} --query connectionString -o tsv)
export AZURE_STORAGE_CONNECTION_STRING
当我运行任务时,变量未正确填充:
$ make do
AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=mycontainerstorage;AccountKey=[removed]
export AZURE_STORAGE_CONNECTION_STRING
我错过了什么?
解决方案
推荐阅读
- python - 不和谐机器人可以回复调用机器人的消息也回复的消息吗?
- c++ - 将本地字符数组与原始字符串文字存储为类成员
- c++ - 为什么初始化不调用赋值运算符
- flutter - “主题:ThemeData ...”显然从 Flutter 2.5.0 开始被忽略
- django - 如何在多对多关系(通过)中找到 django 对象?
- c# - 错误 HRESULT:[0xC00D36B4] 在 sharpDx c# 中从扩展屏幕录制屏幕时
- python - 在 NetworkX 中打印节点名称
- html - 侧边栏没有移动到“主”的左侧,并且 CSS 网格在“横向平板电脑”上没有按预期工作
- powershell - 表达式或语句中出现意外的标记“tut7.4”
- python - 如何将一行从一个txt文件写入另一个?