Pattern: Repeated unquoted spaces between words in echo
Issue: -
ShellCheck found multiple unquoted spaces between words passed to echo
. Due to the way arguments are interpreted and passed in the shell, these will collapse into a single space:
$ echo Hello World
Hello World
If you want to output multiple spaces, such as when creating a notice or banner, make sure the spaces are quoted, e.g. by adding (or extending) double quotes to include them:
$ echo "Hello World"
Hello World
Example of incorrect code:
'''
echo Hello World
Example of correct code:
echo "Hello World"