Template of a Bash script prepared taking into account "Shell script matter" article guidelines.
After you create a new script starting from this template, try to follows Shell Check guidelines.
Install and use the shellcheck
command to check new scripts for errors:
shellcheck <new_script_name>
For documentation about errors and guidelines to solve them, see the shellcheck wiki.