HomeFreeBSD

Shell script good practices changes.

Description

Shell script good practices changes.

It's considered good practice to:

  1. Wrap the variable name in {}. As in ${variable} instead of $variable.
  2. Put variables in ".

Also some minor error message tuning.

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Closes #18000

Details

Provenance
Turbo Fredriksson <turbo@bayour.com>Authored on Mon, Dec 1, 6:15 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Tue, Dec 16, 5:15 PM
Parents
rG61ab032ae039: Fix potential global variable overwrite.
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGd3b447de4e60: Shell script good practices changes. (authored by Turbo Fredriksson <turbo@bayour.com>).Tue, Dec 16, 5:15 PM