title: Echo Output on the Same line
body: <p>I am trying get a output printed on a same line using echo command in bash script. Echo Command is given inside a loop, everytime the loop runs, executes a echo command. But normally, echo will take a new line everytime it executes, but I want the output to be on the same line everytime it executes.</p>
  
  <p>This is how my sample small code look:</p>
  
  <pre><code> #!/bin/bash
  loop=1;
  while [ $loop -lt 5 ];
  do
  echo "-"
  let loop=loop+1
  done
  </code></pre>
  
  <p>I also tried with -n option of echo command, but I got no output. I replaced the stmt - echo "-" with echo -n "-".</p>
  
  <p>Desired output is:
  "-----"</p>
  
  <p>Can some one help me on this</p>