There are many approaches you could try. Arrays can be fun, but for this
I'd suggest using the case/esac shell
"$tag" in 'Creative') tag_short='CRTV' ;; 'Marketing') tag_sho...
Your ending HERDOC lines need to be on their own, move the closing
parenthesis to the next line.Should parse ok after that.
tag=$(/usr/bin/osascript << EOD tell application "System Events"
activate set AssetTag to text returned of (display dialog "Wh...