title: Azure CLI and loop
body: <p>I am trying to figure out the best way to accomplish this with Azure CLI, I have about 50 custom domains I'd like to add to an app service. I use Azure CLI to accomplish this:</p>
  
  <pre><code>az webapp config hostname add --resource-group MYRESOURCE_GROUP--webapp-name MYAPPSERVICE_NAME --hostname DOMAIN.COM
  </code></pre>
  
  <p>Sure I can go ahead and copy and paste each domain, but I rather do it with a script.</p>
  
  <p>How can I write a script to accomplish this? Right now my the domain list is in a txt file.</p>
  
  <p>Thank you!</p>