I have a shell script that checks if a folder has a given number of files and displays error messages to the user. I am using applescript to display an error message. Is there a way to pass script shell variables to AppleScript?
Here is what I have:
declare -i count=5; osascript -e 'tell app "Xcode" to display dialog "Counted $count items." buttons {"Continue"}'
I want the result to be Counted 5 items. but it just appears as Counted $count items. How to pass script shell variable in applescript?
source share