pattern matching problem

FilesToBackup='*.track* *.xml *.vm* *.gz Trace* TRACE* "*core*" *.out fcif_data_* esi_error_* *.rollback *.sed R.* APStatus_*
log* *.output* send_mail* downenv* check_env* intaspurge_db_* sqlnet.log *.rpt *.html *.csv "*TSC*"'

and i am using it like this-
echo Moving files from $(pwd):
        filesclause=$(/bin/echo "$FilesToBackup" | sed -e "s/ /\' -o -name \'/g")
        filesclause="-name '$filesclause'"
        # The following find will search the current dir and all subdirs except only name "centers"
        # Each file that is older than 1 day will be checked against the $FilesToBackup list
        # Those that match will be added to the tmpfile intasclean$$
        if [[ $dir != "." ]]; then
                eval find . -type f \\\( $filesclause \\\) | grep -v "^./centers" > $TEMPDIR/intasclean$$
        else
                echo $FilesToBackup | xargs /bin/ls -1 > $TEMPDIR/intasclean$$ 2>/dev/null
        fi


i have to look for core and TSC to remove the files or to take the backup with the script. When i run the script i am not getting any file with core and TSC even i created some files with touch. Is there any pattern matching problem in this.

Thanks...

Hi guys ,

provide any input in regard to the above question.

Hi Namish,

Use the following to take backup of your files(or you can use 'mv' to move the files)

#***********************
#!/bin/bash
FILENAMES="*.track* .xml *.vm .gz Trace TRACE* "*core*" .out fcif_data_ esi_error_* .rollback .sed R. APStatus_
log* *.output* send_mail* downenv* check_env* intaspurge_db_* sqlnet.log *.rpt *.html .csv *TSC"

for i in $FILENAMES
do
echo $i
find /path/to/search/directory/ -name "$i" -exec cp {} /path/to/backup/directory/ \;
done
exit 0
#******************************************************

Regards,
Vinod