This question already has an answer here:
- Why is printf better than echo? 4 answers
New to shell scripting, I wanted to learn how the echo command works. I started with the following code.
echo -n "What is your name -- " read i echo "Your name is $i"
I do not understand why I still have a new trailing character.
"-n What is your name --"
I am on a mac OS X 10.12.6. I am using zsh. Had the same results with Bash.