Default shell for running scripts (w/o shebang) in macos?

Posted by Igor Spasic on Super User See other posts from Super User or by Igor Spasic
Published on 2014-08-21T15:59:00Z Indexed on 2014/08/21 16:22 UTC
Read the original article Hit count: 525

Filed under:
|
|
|
|

I have ZSH as default shell in MacOS, everything is working fine. ZSH is installed as brew package, Ive set default shell in my account, new shell is listed in /etc/shells... everything is set, like I've said.

I have some shell scripts in which I use some commands from zsh, like print. When I execute the script from command line, the print command is not recognized and the script fails.

This script does not have the shebang line. When I put the shebang line for zsh, then everything works; the print command is working.

Since I am using only ZSH, is it possible to set default shell for running scripts, so I don't have to put shebang line in my .zsh scripts?

Or is it possible to associate .zsh extension to ZSH shell execution?

© Super User or respective owner

Related posts about osx

Related posts about mac