What are you trying to accomplish?Are you trying to script a recovery and to break out of it when the last available archive is applied?
If that is the case use a herelist and put AUTO in the herelist and an exit after the AUTO,.. when the last available archive is applied the exit will get executed and the sqlplus session will end.
For example sqlplus "/ as sysdba" <<EOF recover database using backup controlfile until cancel; AUTO exit EOFThe <<EOF causes each line to be passed to the program (sqlplus) as the program
does a read on the standard input descriptor. When the exit is passed sqlplus will exit and the last EOF ends the herelist Hope this helps Mike Bala wrote:
How do i supply "Cancel" in a Unix Shell script after the SQLPLUS command RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL; any tips/ suggestions highly appreciated. Thanks in Advance ( Hot backup, HP unix, Oracle 10.2.0.4)-- Bala Rao
-- //www.freelists.org/webpage/oracle-l