title: unknown operator error while running .sh file
body: <p>this is my script where it is searching all the log files and zipping it alongwith deleting the older archive.
  However, when i run this script i get the following error :</p>
  
  <p><strong>./file.sh: test: unknown operator .</strong></p>
  
  <p>Code: </p>
  
  <pre><code>#Directory of archives
  
  archive_dr="/u01/apps/weblogic/weblogic10/user_projects/archive"
  
  #Directory of log files
  
  logdir="/u01/apps/weblogic/weblogic10/user_projects/domains/BPM/servers/BPM_MS1/logs"
  
  
  cd $archive_dr
  
  #Removing older archived files
  
  if [ find . \( -name '*.log0*.gz' -o \
           -name '*.out0*.gz' \) ]
  then
      rm *.out00*.gz *.log00*.gz
  fi
  
  cd $logdir
  
  #Search,zip and move the new archive files
  
  if [ find . \( -name '*.log0*' -o -name '*.out0*' \) \
            -atime +30 ]
  then
      for log_files in `find . \( \
              -name '*.log0*' -o -name '*.out0*' \
          \) -atime +30`
  
      do
          gzip $log_files
          mv $log_files.gz /u01/a*/w*/w*/us*/archive
      done
  
      if [$? = 0]; then
          echo "Logs Archieved Successfully"|
          mailx -s " Logs Archieved Successfully" \
              -c 'x@abc.com' y@abc.com'
      fi
  </code></pre>
  
  <p>Please suggest where i am going wrong ?</p>