title: Compare output rather than command
body: <p>Trying to create a script to read a remote file and check the md5 checksum and alert if a mismatch yet getting an error I can't understand.</p>
  
  <pre><code>#!/bin/sh
  REMOTEMD5=$(ssh user@host 'md5sum file.txt')
  LOCALMD5=$(md5sum 'file.txt')
  if [$LOCALMD5 !== $REMOTEMD5]
  then
    echo "all OK"
  else
    echo -e "no match, Local:"$LOCALMD5"\nRemote:"$REMOTEMD5
  fi
  </code></pre>
  
  <p>This returns  <code>line 4: [6135222a12f06b2dfce6a5c1b736891e: command not found</code></p>
  
  <p>I've tried using ' or " around the $LOCALMD5 but never seem able to get this to compare the outputs. What am I doing wrong?
  Thanks</p>