title: Check filename contains a string in bash script
body: <p>I had written a script for moving/Copying files to particular folder.
  I need to check the filenames and move to respective folders.
  I can read the filenamess but, checking the filename contains a string giving the error.</p>
  
  <p>Here my script ::</p>
  
  <pre><code>for eachfile in *; do
    echo "INSIDE"
    echo $eachfile
    if [ [ $eachfile =  "CHPOE05"* ] ]; then
      echo  $eachfile
    else
      echo "invalid"
    fi
  done
  </code></pre>
  
  <p>Below is my error:</p>
  
  <pre><code>Uploading file IN PCS FOLDER
  INSIDE
  CHPOE0500001.txt
  INCOK1IGT1.sh: line 44: [: too many arguments
  invalid
  INSIDE
  CHPOE050i1001.txt
  INCOK1IGT1.sh: line 44: [: too many arguments
  </code></pre>