Gzip list of logfiles
Hello,
I have a list of logfiles, whose names start with a common name and appended by .1, .2 etc(created by log4j). Now I want to retrieve these files from a shell script and run gzip for these files. Here is the code that I wrote, but it is not working.
PACKAGERLOGDIR is location of logfile
PACKAGER_LOGFILE is a file containing the String that these logfile names start with.
My Program is
find $PACKAGERLOGDIR -name ` cat $PACKAGER_LOGFILE` > $filelist
for file in `cat $filelist`; do
gzip $file
done.
This is not working. Could any help me find out where I am going wrong.
Thanks,
Lakshmi
|