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.

  • HerbErtlinger@vlemmy.net
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    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.