How about something like this?
Code:
#!/bin/sh
input=/home/casper/logdir/
output=/home/casper/TEMP/
logfile=""
tempdir=`pwd`
cd $input
for filename in *
do
logfile=$output$filename".tar.gz"
tar -cvzpf $logfile $filename
done
cd $tempdir
I coded it so you can run it from any directory, and it will tar the log files located in the locations in the script. You just need to modify the directories where the log files are located. Hope this helps, and let me know if it does what you need it to do or not.
Cheers,
Josh