title: checking two conditions using while loop in bash script
body: <p>I want to check if the user has not entered 'y' or 'n' and if not then to keep looping asking the user to entered the correct letter but it is not working... the code below shows what I have tried so far ....can someone help me please???</p>
  
  <pre><code>echo "Enter 'y' to exit or 'n' to continue" 
  echo -n "Do you want to exit? "
  read character
  
  while [ "$character" != "y" || "$character" != "n" ];
  do
  
      echo -n "Wrong key re-enter 'y' to exit or 'n' to continue"
      read character
  done
  </code></pre>