Creating zip files

Hi All,
I have a requirement where I have to pick csv files from another unix server by searching the list of files by their name and then copy to my server. Then I want to create their zip file and save it on my server. How can I do it using unix shell script. Please help me with the sample code.

Thanks in advance.

Anil Kumar

Assumption "another unix server" is named aus, you have ssh access to this server and rsync is available on both machines.

files_list contains list of csv files to fetch, if these appear multiple times all copies are retrieved.

csv files are to be searched by name and all reside under the path /csv/file/path on aus.

csv files will be written to the zip file in the directory csv_files plus the same directory path below /csv/file/path. So aus:/csv/file/path/exports/2013_05_21/mydoc.csv will appear in the zipfile as csv_files/exports/2013_05_21/mydoc.csv

rsync -am server:/csv/file/path/ --include-from "files_list" ./csv_files
zip -r archive.zip ./csv_files
rm -rf ./csv_files

file_list would be something like:

+ */
+ mydoc.csv
- *