(See Use #!/bin/sh or #!/bin/bash for Ubuntu-OSX compatibility and ease of use & POSIX)
If I want my scripts to use the Bash shell, does using the .bash
extension actually invoke Bash or does it depend on system config or the first shebang line. If both were in effect but different, which would have precedence?
I'm not sure whether to end my scripts with .sh
to just indicate "shell script" and then have the first line select the Bash shell (e.g. #!/usr/bin/env bash
) or whether to just end them with .bash
(as well as the setting in the first line).
I want Bash to be invoked.
.bash
extension. Also, it's Debian policy to have scripts in packages that land in one of thebin
folders to not have extensions.