Why doesn't this simple AppleScript work? Why doesn't this simple AppleScript work? shell shell

Why doesn't this simple AppleScript work?


The shell doesn't substitute variables (e.g. $Source) inside single-quoted strings (e.g. the entire AppleScript command). Solution: use double-quotes around the command (which means you need to escape the double-quotes inside it with backslashes).

/usr/bin/osascript -e "tell application \"Finder\" to make alias file to POSIX file \"$Source\" at POSIX file \"$Destination\""


Any reason keeping you from using: ln -s "$Source" "$Destination"?