2

So I have a shell script that outputs a format of 2021-01-15 02:20:33. It works in command line and AppleScript but doesn't work in automator. 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.

works in:

  • terminal

enter image description here

  • applescript enter image description here

doesn't work in automator

  • As a shell script: it runs but the output is blank. But there is an output. enter image description here

  • As an Applescript on Automator - no output enter image description here

any help would be appreciated

9
  • Please add the contents of tm.sh to your question. Also, why not make the tm.sh executable and then execute it directly without having to pass it to sh? Commented Jan 19, 2021 at 20:14
  • What is wrong with built-in /bin/date: set timeStamp to do shell script "/bin/date +%Y-%m-%d' '%H:%M:%S"? And you don't need redundant as string. Commented Jan 19, 2021 at 21:29
  • it's actually pulling an embedded time stamp from a file. Commented Jan 20, 2021 at 4:08
  • unfortunately i'm unable to post the actual contents of tm.sh Commented Jan 20, 2021 at 4:08
  • I'm just trying to understand if there is something I have to do to automator that I don't have to do to shell and AppleScript to get the same desired results? Commented Jan 20, 2021 at 4:12

1 Answer 1

3

The issue was automator didn't have full disk access permissions in privacy. After that was enabled the script worked as intended.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.