title: Shell script comparing strings
body: <p>Here's part of a shellscript I'm writing checking passwords stored in a file (along with names):</p>
  
  <pre><code>VALID_PASSWORD=`grep "Karl Marks" hiddenpasswords.txt|cut -f2 -d,`
  echo $VALID_PASSWORD
  echo enter password1
  echo "Please enter the password"
  read PASSWORD
  if test "$PASSWORD" = "$VALID_PASSWORD"
  then
  echo "you have access"
  else
  echo "access denied"
  fi
  </code></pre>
  
  <p>The grep part takes the correct password from the file, however "access denied"  is always run no matter what I type in. </p>