does your script include a header comment to describe it?
#!/usr/bin/bash# ------------------------------------------------------------------ ## This script creates a backup of every MySQL database on the system ## ------------------------------------------------------------------ #
are your global variables at the top of of your script?
DEBUG=trueHTML_DIR=/var/www
Have you grouped all of your functions together following the global variables?
Do your functions use local variables?
local GREETING="Hello"
Does the main body script of your script follow the functions?
Does your script end with explicit exit statuses at various exit points?
Template
#!/usr/bin/bash# ------------------------------------------------------------------ ## <Replace with the description and purpose of the script> ## ------------------------------------------------------------------ #GLOBAL_VAR1="one"GLOBAL_VAR2="two"function function_one () { local LOCAL_VAR1="one" # code}# main bodyfunction_one# exit explicitlyexit 0