3 ms·
Don't forget that if you use #!/bin/sh in POSIX compatible scripts, you can configure /bin/sh to symlink dash shell instead of bash or zsh. Dash will run script
by sandreas 5y ago
Don't forget that if you use #!/bin/sh in POSIX compatible scripts, you can configure /bin/sh to symlink dash shell instead of bash or zsh. Dash will run scripts way faster (up to 4x) because it is less feature blown...
This is the reason, why I try to prevent using bash/zsh exclusive features in my daily use scripts.
- nvllsvm 5y agoI use `#!/usr/bin/env sh` in my scripts to avoid having to overwrite a systems defualt /bin/sh and whatever issues that can result in. Instead, I have ~/.local/bin in PATH with dash symlinked to ~/.local/bin/sh