As Jeff pointed

backup_archive.rcv
connect target / ;
connect catalog user/passwd@catalogdb
run {
allocate channel d1 device type disk format '/rman/logfiles/%d_%u_%p';
BACKUP ARCHIVELOG ALL DELETE INPUT;
release channel d1;
}
exit;


backup_archive.sh

if [[ -z ${1} ]]; then
echo "please provide a dbname and try again";
exit 1;
else
LOGFILE='/backup/${1}_log_`date +\%Y\%m\%d`
fi

rman cmdfile=backup_archive.rcv msglog=${LOGFILE}

exit 0;


I personally would prefer to generate the rcv script dynamically and then delete upon finishing it.

This would tag the file with the DBID and the date

Thanx,
Sam