Shell script to check the files hourly and purge

I'm new to shell scripting... i have been given a task.. can any one help in this regard....

1) Check hourly for files in <destination-path><destination-file-template><destination-file-suffix> for files older than <destination-file-retention> days and purge. It should then check <source-path><source-file-template> for files older than <source-file-retention> and compress them based on <tar-flag> or <gzip-flag> or both. The compressed files should be in <destination-path><destination-file-template><destination-file-suffix>.

2) Provide variable parameters for the following, clearly commented, at the top of the script
Source-path # Source location for files matching source file template
Source-file-template # File name template
Source-file-retention # Files older than (hours) will be processed
Destination-path # Destination may be same or different than the Source path
Destination-file-suffix # None or specified)
Destination-file-template # Could equal source file template or be a combination of source plus suffix
Destination file retention (days) # Files older than this are deleted
Tar flag # If true or y then use tar
Gzip flag # If true or y then use gzip (may both be set for tar and zgip)

Thanks
Satish

Looks like classroom stuff which is against the rules:

The UNIX and Linux Forums - Forum Rules

Closed.

Edit: Just found your partially double posted thread. Double/cross posting is forbidden too.