title: Simple case statement is failing in shell script
body: <p>I had written a very simple case statement which is failing. I double checked the syntax but could not find what went wrong. Can somebody please let me know?     </p>
  
  <pre><code>#!/bin/bash
  
  opt_type=0
  
  
  function opt_type
  {
          echo "Opt Porvisioning tool starting..."
  
          echo -e "1. ABC \n2. DEF \n3. HIJ \n"
          read opt_input
  
          case $opt_input in
          1|abc|ABC)
                  opt_type=1;
  
          2|def|DEF)    
                  opt_type=2;
  
          3|hij|HIJ)    
                  opt_type=3;
  
          4|exit|Exit) echo "Exiting ..."
  
          *) echo "Please enter a valid entry. Exiting!!"
  
          esac
  }
  
  echo $opt_type
  
  
  ./opt_type.sh: line 16: syntax error near unexpected token `)'
  ./opt_type.sh: line 16: `       2|def|DEF)
  -bash-3.2$ 
  </code></pre>
  
  <p>I don't see any such symbol (`) then why is it complaining?</p>