I have a script checking if a file is up-to-minute.
updatedate=`ls -l file | sed -e \'s/ */ /g\' | cut -d\' \' -f7` #cut the modification time nowdate=`date
You need a space on each side of the equals sign.
if [ "$updatedate" = "$nowdate" ]