Shell script for purging the 3 days old files

Hi all,

I try to write shell script to the below requirement.

I have Hard coded the oratab location and take the list of databases from oratab and find out archive log locations for each database,
and list more than 3 days old files for each location and purge those.

ORATAB=/var/opt/oracle/oratab
SID_LIST =`cat ORATAB | cut -f1 -d :`
for ORACLE_SID in ${SID_LIST} ; do
export ORACLE_SID=&ORACLE_SID
export ORACLE_HOME=`grep ^${ORACLE_SID}: ${ORATAB} | cut -d: -f2`
$ORACLE_HOME/bin/sqlplus -s /nolog > ${TMPFILE} << EOF
connect / as sysdba;

select value from v$parameter where NAME ='log_archive_dest';
EOF

From the above shell script i am able to find the archive log location and stored in tmpfile.
I want to know how to read that file and purge the 3 days old files from the specified path
Pleae help me to find out the solution

Thaks in advance

Regards,
Makesh boopathi.k.s.

find ${TMPFILE} -mtime +3 -exec rm -f {} \;

TEST this first to make sure the -mtime +3 is what you really want.

Thanks a lot

Regards,
Makesh