0

In a script they set SEED as

SEED=${4-20}

When I echo $SEED it's 20, so I wonder what is the usage of 4 here?

Ahmad
  • 113
  • 6
  • 1
    See [What is `${1- hour}`?](https://unix.stackexchange.com/questions/459181/what-is-1-hour) and this closely related Q [Using "${a:-b}" for variable assignment in scripts](https://unix.stackexchange.com/questions/122845/using-a-b-for-variable-assignment-in-scripts) – steeldriver Jul 30 '22 at 14:56
  • @JimL. Thanks, so it means the input parameter $4 (if set), otherwise default 10. – Ahmad Jul 31 '22 at 05:45

0 Answers0