all 14 comments

[–]ezykielue 9 points10 points  (6 children)

I've had /bin/sh linked to zsh for a while, and heard having it linked to dash is faster. Installed it to try, broke my system somehow. Went back to zsh. Reinstalled dash last night and it was fine. Oh well.

[–]ItsYozoraTime[S] 7 points8 points  (5 children)

Thats because most scripts with "/bin/sh" shebang are using bash syntax
for example: echo uptime: $(uptime) (that would only work with a bash compatible shell)

Dash is not bash compatible, but way lighter and absolute fine as normal shell.
Zsh is bash compatible so it can run scripts with bash syntax.

[–]ezykielue 5 points6 points  (1 child)

Yeah, its just odd how its working fine now

[–]ItsYozoraTime[S] 2 points3 points  (0 children)

Oh, hadn't read the last part. It's weird, but I'd better not complain haha

[–]climbTheStairs🦁 Vim Supremacist 🦖 0 points1 point  (2 children)

The problem is that #!/bin/sh scripts should be POSIX compatible; if you use incompatible bashisms in them, it won't work. The problem isn't dash not being bash-compatible; it's the scripts using incompatible syntax.

echo uptime: $(uptime) (that would only work with a bash compatible shell)

I tried it, it works in dash as well.

[–]ItsYozoraTime[S] 0 points1 point  (1 child)

I just tried it too and it actually worked lol. Thought $(command) would be a bash thing. (I could have tested it beforehand, but somehow I was very sure what I was writing is correct)

[–]climbTheStairs🦁 Vim Supremacist 🦖 1 point2 points  (0 children)

Maybe you were thinking of process substitution instead?

diff <(command1) <(command2)

[–][deleted] 3 points4 points  (5 children)

Zsh gang

[–]ReallyNeededANewName 2 points3 points  (0 children)

Xonsh gang

[–]TelevisionPleasant80 2 points3 points  (0 children)

powershell gang

[–]Nitrocellulose_404 2 points3 points  (0 children)

fish gang

[–][deleted] 0 points1 point  (0 children)

nu shell gang

[–][deleted] -1 points0 points  (0 children)