title: Shell Script, read on same line after echoing a message
body: <p>Following the shell script that I am executing </p>
  
  <pre><code>#!/bin/sh
  
  echo "Enter [y/n] : "
  read opt
  </code></pre>
  
  <p>Its output is </p>
  
  <pre><code>Enter [y/n] : 
  Y
  </code></pre>
  
  <p>I want that the variable should be read on the same line like below</p>
  
  <pre><code>Enter [y/n] : Y
  </code></pre>
  
  <p>Should be simple I guess, but I am new to bash scripting. </p>