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.

  • GuybrushThreepwo0d@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Just put the shebang at the top of your script:

    #! /usr/bin/env bash

    I’m not a big fan of extensions because if you put the script in your $PATH it’s weird to type do_the_thing.bash