DEV Community

Discussion on: Shellscripting

Collapse
 
puritanic profile image
Darkø Tasevski

Yeah, I would agree that setting zsh as default shell would be a bad idea, it's here just for example purposes.

On the other hand, I've already encountered an issue when I've set shebang to be /bin/sh and after googling for a while I've found that preferred shell for scripts should be bash as basically bash is sh, but with more features and better syntax.
So, I would say that:

#!/usr/bin/env bash

is maybe a better solution.

source

Collapse
 
tux0r profile image
tux0r

Unless your audience doesn't have bash...

Do you really need the additional features for your scripts?

Thread Thread
 
puritanic profile image
Darkø Tasevski

Well, if you put it that way :D I guess you're right. Nevertheless, I don't think that I will write scripts for other users than me anytime soon.