title: Script to read user input not running when run with sh interpreter
body: <p>This may be a duplicate of <a href="https://stackoverflow.com/questions/5542016/bash-user-input-if">bash user input if</a>, but the answers do not solved my problem, so I think there is something else.</p>
  
  <p>I have the next script:</p>
  
  <pre><code>#!/bin/bash
  
  echo "Do that? [Y,n]"
  read input
  if [[ $input == "Y" || $input == "y" ]]; then
          echo "do that"
  else
          echo "don't do that"
  fi
  </code></pre>
  
  <p>and when I do <code>sh basic-if.sh</code></p>
  
  <p><a href="https://i.stack.imgur.com/F5hVU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F5hVU.png" alt="enter image description here"></a></p>
  
  <p>Also I have</p>
  
  <pre><code>#!/bin/bash
  
  read -n1 -p "Do that? [y,n]" doit 
  case $doit in  
    y|Y) echo yes ;; 
    n|N) echo no ;; 
    *) echo dont know ;; 
  esac
  </code></pre>
  
  <p>and when I do <code>sh basic-if2.sh</code></p>
  
  <p><a href="https://i.stack.imgur.com/HCUqa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HCUqa.png" alt="enter image description here"></a></p>
  
  <p>I think my bash has a problem because appereatly the other users didn't have these problems running those examples. Thanks</p>