running as oracle user and line 5 instead of /DEV,will put the correct path.PLan is to enter that DEV directory and delete all the files in that directory,what all are the files in that directory are not needed,so can delete all without checking..and in step 7,
scp -r oracle@PRD:/backup/oracle/PRFN/rman/Sun/* /backup--(DEV location),
here if we run this script in monday,it has to go and scp files from Sun directory from PRD to DEV and if TUE need to chekc in MOn directory ..like that..that am not aware how to code..
And i ran seperately the scripts as you told,but this step:-
restore archivelog low sequence $low high sequence $high; not taking low and high value which already stored in low and high variables(these are numbers)..whaat may be the issue..please