bash – echo command with option to display the output on the same line.

2010-09-21 2 min read bash Fedora Learning Linux
Here is a nice little trick to display the output in the same line : 1 <td> <div class="bash codecolorer"> &nbsp;<span class="kw3">echo</span> <span class="re5">-ne</span> <span class="st0">"output\<span class="es1">\r</span>"</span> </div> </td> </tr> The trick here is simple, first we disable the <a class="zem_slink" title="Newline" rel="wikipedia" href="">newline printed by <a class="zem_slink" title="Echo (command)" rel="wikipedia" href="">echo command with the &#8221;-n&#8221; option and then we enable the interpretation of the <a class="zem_slink" title="Backslash" rel="wikipedia" href="http://en. Continue reading