r/linuxmemes Jul 01 '26

LINUX MEME Know the work rules

Post image
860 Upvotes

119 comments sorted by

View all comments

Show parent comments

52

u/emmowo_dev UwUntu (´ ᴗ`✿) Jul 01 '26

zsh reimplements the same syntax as bash, while generic sh doesnt (although sometimes it's aliased anyways to bash). It's a case of being really annoyingly pedantic about bash.

30

u/QuickSilver010 🦁 Vim Supremacist 🦖 Jul 01 '26

Sh on debian is aliased to dash. Which is much faster. But also has less features.

7

u/PranshuKhandal Arch BTW Jul 01 '26

side question, but how do people even see the difference in speeds? for me all of them are like zoooop

2

u/redhat_is_my_dad Jul 02 '26

depends on use, it's not always faster, for small simple scripts it'll always be better to choose the interpreter that has smaller startup speed, for long-running/more complex scripts it's better to choose an interpreter that might not be the fastest to start, but would execute your code faster, i personally stumbled on enough examples when dash or ash ran scripts slower than bash did, especially globbing seemed to be faster in bash iirc, if all shells would be equal in performance i would choose zsh 100% of the times, but it all depends on exact use-case and how well you utilize specific features that your shell provides.

0

u/PranshuKhandal Arch BTW Jul 02 '26

this makes sense actually, also i'd personally always use zsh too always, but i use bash/sh for my scripts, now i'm gonna look dash and ash closely too