bash-script-template
bash-script-template copied to clipboard
Add defaults to `parse_params()`
Taking on board the feedback in PR #8, I'm feeding back some changes I've found useful.
For consideration:
# DESC: Variable defaults
# ARGS: None.
# OUTS: Variables with default values set.
function defaults() {
verbose=false no_colour=false cron=false outfile=-
}
...
function parse_params() {
....
local param
defaults
# now enjoy the options in order and nicely split until we see --
....
Could be merged to the template? I find that pretty useful, specially for noobies
+1