Hi
The first echo collapses the spaces because the shell executes one echo command with many arguments/parameters. The shell parses it as command, and it can be followed by many arguments/paramters and they're separated by one or more arguments. So the echo command gets 3 parameters and knows nothing about the whitespace. For example:
The number of whitespace characters here doesn't matter. The ls command gets 3 parameters.
The other is the behaviour of printf when you give it more arguments than you specify in the format string. Then it outputs the rest of the arguments with the format string. Same thing as this example:
Code:
printf "The argument is %s.\n" first second third