我试图在终端中运行一些 AppleScript,只是为了学习如何去做,但我在这个&
标志上遇到了一些麻烦。即&
使用“&”替换它,它仍然返回相同的错误。我已将其范围缩小到&
符号问题,想知道是否有人对此有任何建议。我收到以下错误:
语法错误:预期的表达式,但发现未知标记。
我在终端中输入的代码:
osascript -e 'tell application "Finder"' -e 'set location to (path to home folder as string) & \"testing.plist\"' -e 'if (exists file location) then' -e 'say location' -e 'end if' -e 'end tell'