【发布时间】:2021-04-24 04:16:13
【问题描述】:
所以我有一个输出格式为 2021-01-15 02:20:33 的 shell 脚本。它适用于命令行和 AppleScript,但不适用于 automator。不知道如何解决它,我已经进行了一些搜索,但没有任何结果可以解决 shell 脚本在 automator 中不输出值的问题。
适用于:
- 终端
在自动机中不起作用
任何帮助将不胜感激
【问题讨论】:
-
请将
tm.sh的内容添加到您的问题中。另外,为什么不让tm.shexecutable 然后直接execute 它而不必将其传递给sh? -
内置
/bin/date:set timeStamp to do shell script "/bin/date +%Y-%m-%d' '%H:%M:%S"有什么问题?而且你不需要多余的as string。 -
它实际上是从文件中提取嵌入的时间戳。
-
不幸的是我无法发布 tm.sh 的实际内容
-
我只是想了解我是否需要对 automator 做一些我不必对 shell 和 AppleScript 做的事情来获得相同的预期结果?
标签: macos shell applescript automator