title: Unix File extension validation Fails
body: <p>Something I am missing that I am not able to figure out.. Need some thoughts..</p>
  
  <p>I am trying to check file extensions in a directory only file extensions I get .txt or .TXT ) .. but both should be treated as different as I am performing different validations for .txt and .TXT files.. </p>
  
  <p>I have  the below files</p>
  
  <pre><code>aa.394.63.txt
  aa.394.23.TXT
  </code></pre>
  
  <p>Here is my code </p>
  
  <pre><code>for file in "$SEARCH_DIR"/*; do
    extn=$(echo $file | awk -F '.' '{print $NF}')
    echo "extn:" $extn
    if [ $extn=="txt" ]; then
       echo "txt Loop"
    elif [$extn=="TXT" ]; then
       echo "TXT loop"
    fi
  </code></pre>
  
  <p>But this script always be true for the "txt" validations never goes to the "TXT loop".. I think unix is case sensitive and it should be treated as separate.. Pls advise what am I missing .. </p>