>_ IzzyLab

Topic breakdown

The construct ${variable:-value} returns the substituted value if the variable is empty or unset, and the variable itself otherwise; the variable is not changed. This is the standard way to set a default value without an explicit if. It also works with positional parameters (${1:-...}), which is handy for optional script arguments.

What's checked

  1. works both with and without an argument

What it looks like