To zip the files

ls -c /dir1/dir2/test* | while read fileName
      do
               mv $fileName ${TargetDir}
               echo "Moving file: ${fileName} to ${TargetDir}" >> $LOGFILE
            done

In the above scenarion it will move all the files which is having pattern test* from the current directory to TargetDir directory.
What I need is after moving those files I want to zip all the files to one file

For example.I have files like below(the number of files can vary.It can be either 3 0r 10 etc)

test12
test23
test25

So it will move all the three files.Now I need a zip file like below.

test_Date.gz

, which will contains all the above three files.

If you want to zip multiple files to one file, you get one file after you unzip...
If you still want to do this,

gzip -c /dir1/dir2/test* > ${TargetDir}/test_Date.gz

---------- Post updated at 12:41 AM ---------- Previous update was at 12:37 AM ----------

or if you have zip

zip ${TargetDir}/test_Date.gz /dir1/dir2/test*

But the zip file holds the directory structure.
When you unzip in target dir, you see dir1/dir2 created in target

Thanks Srini..

When I do a gzip -c /dir1/dir2/test* > ${TargetDir}/test_Date.gz.All the files will be zipped into test_Date.gz file,But still all files will be there in that path itself.I dont want that files there in that path.I need to remove that file while I do zip

So, you remove it as soon as you finish gzip'ping.

rm /dir1/dir2/test*
gzip -c /dir1/dir2/test* > ${TargetDir}/test_Date.gz

While I unizp the file

test_Date.gz

,its not giving me all the files.It is giving me only one file

mv /dir1/dir2/test* ${TargetDir}/
cd ${TargetDir}
tar -cvzf test_Date.tar.gz ${TargetDir}/