In shell scripting when echo command is used the output always is printed in the next line. For example,
The output of two above echo will be like
If you want to print output in the same line you can use echo with ‘-n’ parameter to avoid printing output in the next line or you can use printf command which is a good replacement of echo command in shell (bash) scripting.
Printf is so close to C printf and has almost the same flexibility and lets you to print out put in forms of tabs.
Bear in mind that bash printf does not include parentheses like C printf.
More information about both echo and printf can be found in their man pages.
send your idea to email@example.com