Hacker News new | ask | show | jobs
by mixmastamyk 1940 days ago
Shebangs direct scripts to the right interpreter. Setting a default interactive shell won’t override it.
1 comments

True, but there do exist (crappy) scrips with incorrect shebangs. EG specifying `#!/bin/sh` when they should use `#!/usr/bin/env bash`, since `/bin/sh` isn't necessarily bash. Could be dash. Could be fish. Could be oil. Etc.)
I think /bin/sh is required to be a POSIX shell, at least when invoked with that name, and fish wouldn’t qualify.