How to execute Zsh shell commands in Bash Script How to execute Zsh shell commands in Bash Script shell shell

How to execute Zsh shell commands in Bash Script


You can use it like that :

#!/bin/bash/bin/zsh -i -c hello

-i : Force shell to be interactive

Then, if the shell is interactive, commands are read from /etc/zshrc and then $ZDOTDIR/.zshrc (this is usually your $HOME/.zshrc)

-c : Run a command in this shell