New to scripting

We have a scripting requirement,
Background:
On a particular path, we compress a load of log files into tar.gz.
This is done on an hourly basis throughout the day and it produces files of the following format,
2005-08-05-00-021031.tar.gz as an example. This is done by a script.

We need:

To uncompress them for a particular day. For ex, if we give 2005-08-05 should uncompress that days tar.gz's
to somewhere safe (possibly specified in as an argument).

Any thoughts?

Regards,

Assuming you want to pass in the date and the destination path as arguments:

DATE=$1
DESTDIR=$2

for ARCHIVE in $DATE*.tar.gz
do
    tar --directory=$DESTDIR -xf $ARCHIVE
done

file compression is by gzip ... wht about the gzip .. (your script nowhere unzips the files )
and also .. it is like each file is TAR'd first and then each one gzipped, using a script and this happens every hour for a given day.