Shellscript exited with non-successful status code: 5

Hi,
I have a really easy ShellScript, which I want to start (with a matching rule):
ocrmypdf -l deu "$1" "OCR_$1"
This ends with the folloing error (accodring to the log):
I first thought, that die command is not found (as probably the PATH is not correct), but 1. the command runs fine in a terminal window and when I added
say $PATH
to the script (so before ocrmypdf)
The correct path is given out, so the command should be found...
So I am quite lost, what to do... I already tried bash instead of zsh, but the result is the same..
Does anybody have a hint?
Thanks in advance
Martin
I have a really easy ShellScript, which I want to start (with a matching rule):
ocrmypdf -l deu "$1" "OCR_$1"
This ends with the folloing error (accodring to the log):
- Code: Select all
2022-06-12 14:36:24.802 hazelworker[73713] [Error] Shell script failed: Error processing shell script on file /Users/Martin/Documents/PDF/Scans/OCRed/Scan_20220514_103931_001.pdf.
2022-06-12 14:36:24.802 hazelworker[73713] Shellscript exited with non-successful status code: 5
2022-06-12 14:36:26.831 hazelworker[73713] Done processing folder Scans
I first thought, that die command is not found (as probably the PATH is not correct), but 1. the command runs fine in a terminal window and when I added
say $PATH
to the script (so before ocrmypdf)
The correct path is given out, so the command should be found...
So I am quite lost, what to do... I already tried bash instead of zsh, but the result is the same..
Does anybody have a hint?
Thanks in advance
Martin