|
yes script has to run every 15days. if it rans today i.e. 13th oct, next would be on 28th oct and again 0n 13th nov.
I have below given the script details,can u tell me how to implement this date logic inside my script
-------------------------------------------------------------------------
#!/bin/ksh
cd /var/preserve
count=0
count=`ls -ltr | grep ^- | grep 'pipe' | wc -l`
if [ $count -eq 0 ]
then
echo "0 Files are owned by pipe"
else
echo "total files owned by pipe is $count"
ls -ltr | grep 'pipe' | xargs rm -f -
echo "All pipe files are deleted"
fi
-------------------------------------------------------------------------
i know of a command that will give the date after 15days, but not getting the logic to implement it inside the script
TZ=`date +%Z`-360 ;a=`date +%Y-%m-%d`--------> 2008-10-28
|