trevor (any/all)

  • 0 posts
  • 2 comments
Joined 3 years ago
Cake day: June 10th, 2023
  • 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.