What trouble I have :
What I'd like to:
input :
az acr create --resource-group demo --name somefuntion(uuidgen) --sku Basic
expectd :
az acr create --resource-group demo --name "daf506ea86a64c478f5762238a3cc208" --sku Basic
What I've tried :
I know uuidgen
can get uuid like
$ uuidgen
daf506ea-86a6-4c47-8f57-62238a3cc208
$()
allows for Command Substitution in Bash, i.e., it allows the output of a command to be substituted in place of the command itself.tr
command in Unix can be used to transform the generated UUID to the required format.Putting these together, you get:
which should help you with what you want.