bash - Oracle expdp CentOS 6.2 Shell script unusual behavior - New line gives command not found -


My first post is gentle.

I have a script that was working fine for backups of a RedHat 5.3 box on an Oracle Database Script Layer 5.3 box. I then used it as a reference to Oracle DB backup on a Saks 6.2 box and amended it as necessary.

  #! / Bin / bash ORACLE_HOME = "/ u01 / app / oracle / product /11.2.0/db_1" NLS_LANG = AMERICAN_AMERICA.AR8ISO8859P6 BKDATE = `date" +% Y-% m-% d_% H% M% S "` C. 1 = "system / password @ dbname DIRECTORY = RMBACKUP schema = USER1, USER2, user3 Dnpfail = Dbname_" C 2 = "_ full_pump.dmp logfile = Dbname_" C 3 = "_ full_pump.log" BKCMD = $ C $ 1 BKDATE $ C2 $ BKDATE $ C3 Bouncing $ C 1 Echo $ C2 Bounce $ C3 Buzz $ BKDATE The echo weird load is that when I execute the script, then there is no command found in the new line, the error occurs and The merger gets merged. Below is seen as  
  system / password @ dbname DIRECTORY = RMBACKUP schema = USER1, USER2, user3 dump file = dbname_ _full_pump.dmp logfile = dbname_ _full_pump.log 2012-07-10_09-39-06 system / password @ Dbname DIRECTORY = RMBACKUP SCHEMAS = USER1, USER2, USER3 DUMPFI_full_pump.log39-06ILE = dbname_ / bin / expdp: The date of merge with no such file or director is not a typo, which is Echo Output.  

I added the set-X in the beginning and there is an output

  + ORACLE_HOME = $ "/ u01 / app / oracle / product / 11.2.0 / db_1 \ r '+ NLS_LANG = $ "AMERICAN_AMERICA.AR8ISO8859P6 \ r' ++ Date +% Y-% m-% d_% H-% M-% S + BKDATE = $ '2012-07-10_10-27-45 \ r' + C1 = 'system / password @ dbname directory = RMBACKUP schema = USER1, USER2, user3 DUMPFI'E = dbname_' C 2 = '_ full_pump.dmp logfile = dbname_ + C 3 = _full_pump.log + BKCMD =' system / password @ dbname DIRECTORY = RMBACKUP schema = USER1, USER2, user3 DUM_full_pump.log '7-45ILE = dbname_ + echo system / password @ dbname DIRECTORY = RMBACKUP schema = USER1, USER2, user3 $' Dnpfail = dbname_ \ r 'system / W Asward @ dbname DIRECTORY = RMBACKUP Schema = USER1, USER2, user3 Dnpfail = dbname_ + _full_pump.dmp echo $ 'logfile = dbname_ \ r' _full_pump.dmp logfile = dbname_ + echo $ '_ full_pump.log \ r' _full_pump.log + Echo $ 2012-07-10_10-27-45 \ r \ r '2012 -07-10_10-27-45 + echo system / password @dbna me DIRECTORY = RMBACKUP schema = USER1, USER2, user3 $' dumpfile = dbname_ \ R2012-07-10_10-27-45 \ r_full_pump.dmp '$' logfile = dbname_ \ r2012-07-10_10-27-45 \ r_full_pump.log \ r 'system / password @ dbname DIRECTORY = RMBACKUP schema = USER1, USER2, User3 dumpfile = dbn_full_pump.log27-45ILE = dbname_ + $ '/ U01 / apps / oracle / product / 11.2.0 / db_1 \ r / bin / expdp' system / passer E @ dbname DIRECTORY = RMBACKUP Schema = USER1, USER2, user3 $ 'Dnpfail = dbname_ \ r2012-07-10_10-27-45 \ r_full_pump.dmp' $ 'logfile = dbname_ \ r2012-07-10_10-27- 45 \ r_full_pump .log \ r '/ bin / expdp: such a file or directoryacle / product / 11.2.0 / db_1   

Waiting for response ...

you can see, see '\ r' characters in texts. Perhaps you have edited that file with an editor which automatically adds \ r at the end of the lines. You will have to edit the file once again and delete these letters.

Comments