title: how to move directories within a directory from a shell script?
body: <p>trying a script to move folders from my internal to external hard disk from within a directory....</p>
  
  <pre><code>#!/bin/bash
  for i in *; do
      if [[ $i == [* ]]; then
          mv $i /entertainment/movies/;
      fi
  done
  </code></pre>
  
  <p>i get the below error:</p>
  
  <pre><code>mv: cannot stat 'DVDRip': No such file or directory
  mv: cannot stat '-': No such file or directory
  mv: cannot stat 'x264': No such file or directory
  mv: cannot stat '-': No such file or directory
  mv: cannot stat 'DD5.1': No such file or directory
  mv: cannot stat '-': No such file or directory
  mv: cannot stat '1GB': No such file or directory
  mv: cannot stat '-': No such file or directory
  mv: cannot stat 'ESub': No such file or directory
  </code></pre>