通过报价和QUOT;不要shell脚本"在AppleScript的...再次 [英] Passing quotes "do shell script" in AppleScript... Again

查看:142
本文介绍了通过报价和QUOT;不要shell脚本"在AppleScript的...再次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在AppleScript的以下行

I have the following line in AppleScript

set msgDate to (current date) as string
set removalString to "\"rm -f ~/Library/LaunchAgents/com.playlister.\"" as string    
do shell script "echo do shell script " & removalString & msgDate & ".plist" & ">> ~/Library/Playlister/" & msgDate & ".applescript"

我试图做的,再次,是通过字符串

What I'm trying to do, yet again, is pass the string

do shell script "rm -f ~/Library/LaunchAgents/com.playlister.whateverthedatestampis.plist"

的在正确的位置引号。我身边不少东西移动在盲目尝试获取报价吧,我已经几乎得到它,但并不完全。

with the quotes in the correct place. I'm moving stuff around quite a bit in a blind attempt to get the quotes right, and I've almost gotten it, but not quite.

任何了解或协助AP preciated!

Any insight or assistance is appreciated!

推荐答案

您试图做到这一点?

set msgDate to (current date) as text
set removalString to "rm -f ~/Library/LaunchAgents/com.playlister."

do shell script "echo do shell script \\\"" & removalString & msgDate & ".plist\\\"" & " >> ~/Library/Playlister/" & quoted form of msgDate & ".applescript"

这篇关于通过报价和QUOT;不要shell脚本"在AppleScript的...再次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆