【问题标题】:Executing Shell Script via Automator通过 Automator 执行 Shell 脚本
【发布时间】:2014-07-05 18:39:17
【问题描述】:

通过 Terminal/Totalterminal 或 iTerm,此脚本运行良好:

cd ~/go/to/dir/ && R -e "shiny::runApp("/go/to/dir", launch.browser=TRUE)"

但是作为/在通过 Automator 的应用程序中,第二部分不起作用。

在 Automator 中:运行 Shell 脚本。 “普通”终端和 Automator 使用的终端的区别在哪里。 在 /bin/bash

【问题讨论】:

  • 运行shell脚本与automator中的终端不同
  • 我很少使用自动机,但在苹果脚本中,如果你使用规范的命令行(例如使用 R)做某事,你必须运行 tell application "Terminal" activate do shell script "..."
  • 几乎完美 ;) 但到目前为止,applescript 在您需要的 AS 中与 R -e 'shiny::runApp("/Users/1/2/3/", launch.browser=TRUE)' 存在问题:"R -e 'shiny::runApp("/Users/1/2/3/", launch.browser=TRUE)'" 它是标记问题。
  • 是的,我试过了,但总是失败。我错过了“\”的正确位置
  • 发布您嵌入到 Applescript Automator 操作中的 applescript,我们可以帮助处理引用的表单等。

标签: r macos shell automator


【解决方案1】:

r 在 Automator 的路径上吗?如果不是,请将r 替换为完整路径,例如/usr/local/bin/r(显示为which r)。

【讨论】:

    猜你喜欢
    • 2014-10-06
    • 2020-05-31
    • 1970-01-01
    • 2014-09-29
    • 2013-04-17
    • 2015-11-01
    • 2018-02-19
    • 2016-02-29
    • 1970-01-01
    相关资源
    最近更新 更多