This reminds me my start with linux systems. Back then I read some guides how to make some automation scripts and they alway stated to put #!/bin/sh
with no explanation what that does. So at the time I took it as some “magic formula” that I don’t have to care about just yet.
Later I found out there are other modifications like #!/usr/bin/env python
and that made me wonder what that magic formula actually does.
From that time I use only #!/bin/bash
for my scripts (even for POSIX-compliant) because I neve know if I introduce some bashism into the script later (but I know myself enough that I will certainly forget to update shebang).
I hope this will make the frog-monster to ignore me a little while longer.
One question: If the script is not POSIX-compliant is it OK to assume #!/bin/bash
is the correct fix or could it be intended for another shell like zsh
, fish
, …?