title: passing null value from az cli to bash without exiting
body: <p>I'm trying to get the value of a resource in azure via AZ CLI, and pass that value to a variable in bash.</p>
  <pre><code>id=$(az synapse workspace show -n $name -g $rsname --query 'identity.principalId' -o tsv 2&lt;&amp;1)
  if [[ $id == *&quot;Not Found&quot;* ]];
  then
      echo &quot;Workspace already deleted.&quot;
  fi
  </code></pre>
  <p>If the resource is not there, I am redirecting the output to the variable with 2&lt;&amp;1 so I can deal with it in the if-then conditional.  $id is getting assigned the output correctly, but AZ CLI is still exiting the script with error &quot;not found&quot;.</p>
  <p>Is there anyway to keep it from exiting?</p>