#!/bin/sh
backup_log="/usr/ivo/prod/aplog/RepairCSVmerge.log"
data_dir="/usr/ivo/prod/aplog_bk/"
DAT=`date | awk '{print $1}'`
filename="`date +%G%m%d`.tar"
old_filename="`date -d "-3 week" +%Y%m%d`.tar"
if [ $DAT = 'Fri' ]
then
rm -rf $data_dir$old_filename
tar cvfP $data_dir$filename $backup_log
cat /dev/null > /usr/ivo/prod/aplog/RepairCSVmerge.log
fi