oracle rman connecting to a database in not mount state When connected to oracle database through rman directly from the terminal, everything works fine, but when the same connection string is executed through a shell script rman connects to the database in a no mount state, not sure why, using oralce 11g, oracle Linux, and the connection  string is :

rman target / catalog (userName)/(password)@//(IPADDRESS):(PORT)/SYNDEV
To connect to RMAN from the operating system command line and hide authentication information, you must first start RMAN and then perform either of the following actions:


Run the CONNECT commands at the RMAN prompt. ...
Run a command file at the RMAN prompt that contains the connection
information.