Say I create a cron job that runs a Zsh or Bash script as /path/to/shell_script.sh

Would such a shell be a non-interactive non-login shell? If so, what shell init files would be executed (for Bash & Zsh)?

有帮助吗?

解决方案

zsh sources .zshenv (source).

bash sources $BASH_ENV if set. (source)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top