What error message do you get?
What does the log filenames look like?
You say restore prod to user but the ls is on test
ls -ltr /archive/
testdb
You seem to make thing unnecessary complex
Code:
wd=`date +%a`
if [ "$wd" = "Sun" ]
then
echo "Full Restore"
else
echo "Log restore"
fi
It seems you do not specify the file name for the log restore
ls -ltr /archive/testdb/|grep progress|
cut -c67-78>unc
while read
ai
...
$DLC/bin/rfutil dbname -C roll forward -a /archive/testdb/
$ai
And you prbably don't need the grep and cut commands
And on Tue you don't want to reload Mon logs do you?