jgr208 jgr208 - 10 months ago 27
Bash Question

What is the preferred method to echo a blank line in a shell script?

I am currently writing some code for a shell script that needs a blank line between two parts of the script, as thus they can be separated when output is displayed to the user.

My question is, I am not sure what the preferred practice is in a shell script for a blank line.

Is it preferred practice to just write

and nothing else or to write
echo " "
as in echo with quotes and blank between the quotes?


echo is preferred. echo " " outputs an unnecessary space character. echo "" would be better, but it's unnecessary.