help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how bash run by crontab is different from login bash shell?


From: Peng Yu
Subject: how bash run by crontab is different from login bash shell?
Date: Wed, 9 Sep 2020 20:05:22 -0500

Hi,

I have the following line in crontab.

* * * * * LANG=en_US.UTF-8 /usr/local/bin/bash -c 'builtin enable -f
/Users/xxx/Downloads/bash-5.0/examples/loadables/realpath realpath'
>/tmp/crontab_stdout_realpath.log 2>/tmp/crontab_stderr_realpath.log

But it prints the following error.

$ cat /tmp/crontab_stderr_realpath.log
/usr/local/bin/bash: line 0: enable: cannot open shared object
/Users/xxx/Downloads/bash-5.0/examples/loadables/realpath:
dlopen(/Users/xxx/Downloads/bash-5.0/examples/loadables/realpath, 1):
no suitable image found.  Did find:
        file system sandbox blocked open() of
'/Users/xxx/Downloads/bash-5.0/examples/loadables/realpath'

But the following command run in the login shell works fine. Does
anybody know what is the difference between bash run by crontab and
the login shell? How the error is caused? The OS is Mac OS Catalina
10.15.6. Thanks.

$ builtin enable -f
/Users/xxx/Downloads/bash-5.0/examples/loadables/realpath realpath

-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]