title: In Azure Devops, how can i use pipeline variables in a "Azure CLI task v.2" running shell script?
body: <p>I am trying to execute a task using Azure CLI and <strong>bash</strong> in Azure Devops. I am using <strong>Azure CLI task v.2</strong> and choosing <em><strong>shell</strong></em> as script type as below.
  <a href="https://i.stack.imgur.com/CcCoN.png" rel="noreferrer"><img src="https://i.stack.imgur.com/CcCoN.png" alt="enter image description here" /></a>
  I want to use pipeline variables in bash script. I run the command below inside the script:</p>
  <pre><code>#!/bin/bash
  az role assignment create --role &quot;Lab Admin&quot; --assignee $(ownerEmail) -g $(rgName)
  </code></pre>
  <p>and i got the error below:</p>
  <pre><code> line 2: ownerEmail: command not found
   line 2: rgName: command not found
  </code></pre>
  <p>I don't understand. Normally, i should be able to use azure cli in a bash script.
  Does anybody have an idea?</p>