The file extension doesn’t matter much on Linux. If you’ve got a shebang at the top, the shell you’re running from will invoke the correct shell according to the shebang.
In some situations, you may want to use something like bash <your-script>, but that would only be when you’ve got a script that doesn’t have a shebang, but not having one is bad practice and you really should be using them. Fish isn’t the only non-POSIX shell you’re going to encounter on a Linux system. Python, Perl, and probably some others will be there, and using a shebang ensures no shenanigans. So whether or not you use Fish, you should always use shebangs.
The file extension doesn’t matter much on Linux. If you’ve got a shebang at the top, the shell you’re running from will invoke the correct shell according to the shebang.
In some situations, you may want to use something like
bash <your-script>, but that would only be when you’ve got a script that doesn’t have a shebang, but not having one is bad practice and you really should be using them. Fish isn’t the only non-POSIX shell you’re going to encounter on a Linux system. Python, Perl, and probably some others will be there, and using a shebang ensures no shenanigans. So whether or not you use Fish, you should always use shebangs.