#/bin/bash
corr="apple"
echo $corr
osascript -e 'tell application "Messages" to send  "Did you mean "'"$corr"'" "  to buddy  "A"'
Error:
51:57: syntax error: A identifier can’t go after this “"”. (-2740)
If I just pass
osascript -e 'tell application "Messages" to send  "Did you mean $corr "  to buddy  "A"'
the message comes like "Did you mean $corr"
I have tried everything mentioned at Pass in variable from shell script to applescript
 
     
    