その方法を学ぶためだけに、端末で 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'