i’m pretty new to the shell scripting world and not sure, if i should give my scripts a .sh or .bash extension.
not sure what the pros and cons are.
i’m pretty new to the shell scripting world and not sure, if i should give my scripts a .sh or .bash extension.
not sure what the pros and cons are.
This is how I do it as well. Shell scripts that I include in a project are named with a .sh extension so other users can identify them easily. Scripts that I want to run as commands often are in my $HOME/bin/ and don’t have an extension. Sometimes those are convenience symlinks with easier names, so ~/bin/example might be a link to ~/repos/example-project/example-script-with-long-name.sh.