title: unable to solve "syntax error near unexpected token `fi'" - hidden control characters (CR) / Unicode whitespace
body: <p>I am new to bash scripting and i'm just trying out new things and getting to grips with it.</p>
  
  <p>Basically I am writing a small script to store the content of a file in a variable and then use that variable in an if statement.</p>
  
  <p>Through step by step i have figured out the ways to store variables and then store content of files as variables. I am now working on if statements.</p>
  
  <p>My test if statement if very VERY basic. I just wanted to grasp the syntax before moving onto more complicated if statement for my program.</p>
  
  <p>My if statement is:</p>
  
  <pre><code>if [ "test" = "test" ]
  then
      echo "This is the same"
  fi
  </code></pre>
  
  <p>Simple right? however when i run the script i am getting the error:</p>
  
  <pre><code>syntax error near unexpected token `fi'
  </code></pre>
  
  <p>I have tried a number of things from this site as well as others but i am still getting this error and I am unsure what is wrong. Could it be an issue on my computer stopping the script from running?</p>
  
  <p>Edit for ful code. Note i also deleted all the commented out code and just used the if statement, still getting same error.</p>
  
  <pre><code>#!/bin/bash
  #this stores a simple variable with the content of the file testy1.txt
  #DATA=$(&lt;testy1.txt)
  #This echos out the stored variable
  #echo $DATA
  #simple if statement
  if [ "test" = "test" ]
  then
      echo "has value"
  fi
  </code></pre>