brlin-tw / GNU-Bash-Shell-Script-Template

Easy-to-use GNU Bash shell script templates for for users to create new scripts.
https://github.com/Lin-Buo-Ren/GNU-Bash-Shell-Script-Template
17 stars 2 forks source link

Demonstration of bloat using meta_util_is_parameter_set_and_not_null() #12

Open Explorer09 opened 6 years ago

Explorer09 commented 6 years ago

s/meta_util_is_parameter_set_and_not_null *\([A-Za-z_][0-9A-Za-z_]*\)/[ -n "${\1-}" ]/g

"${foo-}" won't error out upon set -o nounset

(https://mywiki.wooledge.org/BashFAQ/112)