简体   繁体   English

macOS automator - 运行 shell 脚本不起作用

[英]macOS automator - run shell script not working

So I have a shell script that outputs a format of 2021-01-15 02:20:33.所以我有一个输出格式为 2021-01-15 02:20:33 的 shell 脚本。 It works in command line and AppleScript but doesn't work in automator.它在命令行和 AppleScript 中工作,但在自动机中不起作用。 Not sure how to troubleshoot it i've done a few searches but nothing comes up that addresses this issue of a shell script not outputting value in automator.不知道如何对其进行故障排除,我已经进行了一些搜索,但没有任何结果可以解决 shell 脚本未在自动机中输出值的问题。

works in:工作于:

  • terminal终端

在此处输入图像描述

  • applescript applescript 在此处输入图像描述

doesn't work in automator在自动机中不起作用

  • As a shell script: it runs but the output is blank.作为 shell 脚本:它运行但 output 为空白。 But there is an output.但是有一个 output。 在此处输入图像描述

  • As an Applescript on Automator - no output作为 Automator 上的 Applescript - 没有 output 在此处输入图像描述

any help would be appreciated任何帮助,将不胜感激

The issue was automator didn't have full disk access permissions in privacy.问题是 automator 在隐私方面没有完整的磁盘访问权限。 After that was enabled the script worked as intended.启用后,脚本按预期工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM