Enclose the string in quotes. The previous example, but with quotes added, will preserve our spacing.
$ echo "this was very widely spaced" this was very widely spaced $
or:
$ echo 'this was very widely spaced' this was very widely spaced $
Since the words are enclosed in quotes, they form a single argument to the echo command. That argument is a string and the shell doesn’t need to interfere with the contents of the string. In fact, by using the single quotes ('') the shell is told explicitly not to interfere with the string at all. If you use double quotes (“), some shell substitutions will take place (variable and tilde expansions and command substitutions), but since we have none in this example, the shell has nothing to change. When in doubt, use the single quotes.
help echo
help printf
Chapter 5 for more information about substitution
“echo Options and Escape Sequences” in Appendix A
18.223.195.29