Govind
Govind

Reputation: 2348

Apple script getting Syntax error - Error: Expected end of line, etc. but found “"”

#! /usr/bin/osascript
osascript -e "do shell script 
"chmod 777 /Library/ColorSync/Profiles" with administrator privileges"

Error: Expected end of line, etc. but found “"”.

I am new to apple script. I need to run this with NSAppleScript. AS first step, from the script editor I am getting the above error message.

Upvotes: 2

Views: 669

Answers (1)

Arc676
Arc676

Reputation: 4465

You have the #!/usr/bin/osascript shebang. You don't need to call osascript in your code. Just do:

#!/usr/bin/osascript
do shell script "foo"

Upvotes: 3

Related Questions