I was trying to use the following script to determine if a USB has been found or not, but it either doesn't have permission to check the /Volumes/ folder or doesn't work like that. Any help is apprecaited.
while [ ! -d "/Volumes/Summer 2021/" ] do echo "USB Not found. Waiting 30 seconds." if [ $Popups = true ] then osascript -e 'display notification "USB Missing!" with title "Automated Setup"' fi sleep 30 done