Help with copying the list of files from one location to other location

A) I would like to achive following actions using shell script. can someone help me with writing the shell script

1) Go to some dir ( say /xyz/logs ) and then perform find operation in this dir and list of subdir using

find . -name "*" -print | xargs grep -li 1367A49001CP0162 > /tmp/nbkzkvc0xs/tracefile 

Pls note that "1367A49001CP0162" this will be the command line argument/parameter to be used while running the script
2) Then, I need to copy all the files present in "/tmp/nbkzkvc0xs/tracefile" file to some /tmp/Girish location
3) Once all the files are copied in /tmp/Girish location, i need to zip them in trace.zip file and then send this zip file on to my email id say xyz@gmail.com

Thanks,
GKG

---------- Post updated at 07:04 AM ---------- Previous update was at 05:52 AM ----------

B) Pls help me to write a shell script.
I have to to run mutiple SQL and store their result in excel file at some/tmp location.

Pls help how can I achieve the following things :
1) DB connection in shell script
2) once connection is made, how to run the sql inside shell script
eg: select * fromfile_table where file_id like'%9184H70140%';

Pls note that "9184H70140" this will be the command line argument/parameter to be used while running the script

3) store the result of above select SQL in the .csv or .xls file and then copy that file to /tmp location

These are two independent questions in one thread. Please split them up into two threads.

On your items A 1) & 2), why don't you try sth like

find . -iname "*1367A49001CP0162*" -exec cp {} /tmp/Girish +