Рет қаралды 5,570
Are you tired of having your shell scripts run by the slow, bloated bash? In this video, I'll show you how you can change your system shell (/bin/sh) to dash for minimal performance and security gains-and, more importantly, how to write better shell scripts that are portable, posix-compliant and usable by everyone, not just bash users.
Article on checking for Bashisms and testing with Dash: dev.to/bowmanj...
Dash article in the Arch Wiki: wiki.archlinux...
Watch my videos on Odysee: odysee.com/@er...
My website: ericmurphy.xyz
My GitHub: github.com/eri...
0:00 Intro
1:14 Differences between bash and dash
2:35 Installing dash
2:45 Checking /bin/sh scripts to remove bashisms
6:23 Making your scripts dash-compliant
7:40 Or just set bash scripts explicitly with /bin/bash
9:02 Using shellcheck for even more detail
10:00 Symlinking /bin/sh to dash
10:41 Relinking dash every time bash updates
11:45 Conclusion