Shell script deleting oracle backup?
First of all, hi to all!
My problem is..
I setup linux script to delete my backups older than few days:
RBRDAN=`date –date=”3 days ago” +%w`
rm /u02/oracle/backup/rman/$RBRDAN/*
But, I got error:
rm: cannot remove `/u02/oracle/backup/rman/6\r/*’: No such file or directory
For some reason, it gives me “\r” at the end of the day. Instead of “6″, it gives me “6\r”.
Does anybody know what is the problem?
p.s. Backup files are on storage and scriipt is running on the database server..
Thanks.
|