简体   繁体   中英

Executing Bash Command with Variable (Azure CLI)

I'm trying to update Azure AD App by executing the following command

Now first this is the result of echo of appId

在此处输入图像描述

now when i try to execute the update command:

在此处输入图像描述

now if i try the same command with the value inline it works as below:

在此处输入图像描述

I'm not sure what is wrong,, and why using a variable does not work but using inline value works. this is part of a long script so its important for me to utilize variables.

Any one faced this before?

Thanks to @BenJamin W reference, I had to change the command to:

az ad app update --id ${appId//$'\r'} --set groupMembershipClaims=All

This removed the $ and the newline at the end.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM