Is this all of your script? I'm missing something like the following at one of the first lines: #!/bin/bash Also it's my experience that you do not need the \n's after every line. And the EOF" should read EOF I guess. Can you please include some more (the whole) of the script you are editing? And maybe some results or the errors. Oh...and rman changed a little over versions so maybe you should include some details concerning OS and oracle versions. Best Regards, Martijn Bos On Fri, Dec 09, 2011 at 03:38:09PM -0500, sundar mahadevan wrote: > Hi All, > I have done the following similar with sqlplus -s but cant get this for > rman. Not sure what i am doing wrong. i tried it with "echo -e" as well but > cant get it to work. Has anyone got this to work? Thanks in advance. > cmd="rman target sys@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx auxiliary > sys@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@/u01/app/oracle/sm/build_cricprodls.rcv > <<EOF\n > PasswordOfPrim\n > PasswordOfLogstdby\n > EOF" > > eval "$cmd" > > > -- > //www.freelists.org/webpage/oracle-l > > -- //www.freelists.org/webpage/oracle-l