0
votes

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

1
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? - user3439894
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. - vadian
it's actually pulling an embedded time stamp from a file. - Lacer
unfortunately i'm unable to post the actual contents of tm.sh - Lacer
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? - Lacer

1 Answers

0
votes

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