I have this function that I've written:
function alert {
command='display alert '
content="${1} message ${2}"
concat=$command$content
osascript -e "${concat}"
}
When executed like:
alert 'Title' 'Message'
I get the error message:
25:27: syntax error: A end of script can’t go after this “my”. (-2740)
Why is that the case?
For reference this command works perfectly:
osascript -e 'display alert "Title" message "Message"'