I am using the following shell code to move files from one location to another:
for i in [ test1 test2 test3]
do
  mv /home/usr/enabler/$i/*  /home/bin/enabler/consolidate
  echo "moved successfully!!!"
done                                                                               
Running in the bash shell I get the error "Illegal file pattern: Unclosed character class near index 1". I want the loop to go to each folder test1, test2, test3 and move all files present in test1,  test2, test3 in destination folder.
 
     
     
    