Since the Microsoft Q&A community has a policy that the question author cannot accept their own answer. They can only accept answers by others, I' have summarized and posted the solution, request you to Accept the answer, it will benefit the community find the answers quickly.
@scott cable - Thanks for sharing the solution.
Question:
MS Learn lab for knowledge mining on Azure Search provided method is to create a container and populate it doesn't work on Mac by default.
Solution is to replace the .cmd script with the following .sh script:
#!/bin/bash
# Enable the script to exit immediately on error
set -e
# Set values for your storage account
subscription_id="<subscription_id>"
azure_storage_account="<azure_storage_account>"
azure_storage_key="<azure_storage_key>"
echo "Creating container..."
az storage container create --account-name "$azure_storage_account" --subscription "$subscription_id" --name margies --public-access blob --auth-mode key --account-key "$azure_storage_key" --output none
echo "Uploading files..."
az storage blob upload-batch -d margies -s data --account-name "$azure_storage_account" --auth-mode key --account-key "$azure_storage_key" --output none
If the answer helped (pointed you in the right direction) > please click Accept Answer - it will benefit the community to find the answers quickly.