The situation when people go on stackoverflow and just grab some shit from the top answer and just copy paste in their console is surprisingly normal. Not me, obviously, but like other people do it all the time.
That’s true, but I definitely use fish as my default shell and when it runs a script without shebang it automatically runs it with bash. Thus I assume that’s the fish default to make your scripts work.
Trying to be more POSIX-compatible by further breaking POSIX spec is an ok choice to make in this case imo, but I think that’s a somewhat important detail to know :)
Fish is for people who like it when sometimes scripts don’t work
Why would sometimes scripts not work? All scripts are executed with bash by default.
No, they are executed according to the shebang on the first line, which is usually bash. If it is missing, it will default to the current shell.
what kind of monster writes a script without a shebang?
The situation when people go on stackoverflow and just grab some shit from the top answer and just copy paste in their console is surprisingly normal. Not me, obviously, but like other people do it all the time.
That’s true, but I definitely use fish as my default shell and when it runs a script without shebang it automatically runs it with bash. Thus I assume that’s the fish default to make your scripts work.
Trying to be more POSIX-compatible by further breaking POSIX spec is an ok choice to make in this case imo, but I think that’s a somewhat important detail to know :)
I like to gamble what can i say