473,324 Members | 2,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

getting this error-SP2-0734: unknown command beginning "/opt/SP/we..." - rest of line

1
Expand|Select|Wrap|Line Numbers
  1. #************************************************************************************************
  2. #   File NAME         : master_Unix_New.sh                                           
  3. #   PURPOSE           : This script is used for the deployment automation.
  4. #   Market            : Common                                                                 
  5. #   In Parameters     : Source_Fld_Path,Dest_Fld_Path,db_User_Name,db_Password,ddl_Input                                      #   Out Parameters    : NA                                                                     
  6. #   REVISIONS:                                                                                   
  7. #   Ver        Date            Author           Description                             
  8. #  ----------------------------------------------------------------------------------------------
  9. #   1.0       2-Jan-2014    Infosys          1. Created this Initial versionscript.
  10. #************************************************************************************************
  11. #!/bin/bash
  12. #Taking source folder path as current directory
  13. source_Fld_Path=`pwd`
  14. #Taking destination directory from csv file
  15. IFS=","
  16.  
  17. i=1
  18.  
  19. while read OPCO_CODE DOMAIN_TYPE RPAS_BOX_NAME DOMAIN_NAME ODI_TAPAS_HOME RPAS_PROFILE_NAME PROD_BATCH_LOAD_TRACKER_NAME PROD_WINDOW_TRACKER_NAME DESTINATION_FOLDER_PATH
  20. do
  21.  
  22.     #skip header record
  23.  
  24.     test $i -eq 1 && ((i=i+1)) && continue
  25.  
  26.     #
  27.  
  28.     dest_Fld_Path="$DESTINATION_FOLDER_PATH"
  29. done < ODI_deployment.csv
  30.  
  31. eval db_User_Name=$(echo "$1")
  32. eval db_Password=$(echo "$2")
  33. eval ddl_Input=$(echo "$3")
  34.  
  35. echo -e `date +%Y-%m-%d-%T` "[master_unix] Start of master Unix Script\n" >>  $source_Fld_Path/log_Deployment.txt
  36. cd $dest_Fld_Path
  37. if [ -x $source_Fld_Path/Unix_Scripts/createFolders.sh ]
  38. then
  39.     cp $source_Fld_Path/Unix_Scripts/createFolders.sh $dest_Fld_Path
  40.     echo -e `date +%Y-%m-%d-%T` "[master_unix] createFolders copied successfully\n" >>  $source_Fld_Path/log_Deployment.txt
  41.  
  42.     dos2unix createFolders.sh
  43.     echo -e `date +%Y-%m-%d-%T` "[master_unix] dos2Unix on createFolders successful\n" >>  $source_Fld_Path/log_Deployment.txt
  44.  
  45.     chmod 777 createFolders.sh
  46.     echo -e `date +%Y-%m-%d-%T` "[master_unix] chmod on createFolders successful\n" >>  $source_Fld_Path/log_Deployment.txt
  47.     ./createFolders.sh
  48.     echo -e `date +%Y-%m-%d-%T` "[master_unix] Execution of createFolders successful\n" >>  $source_Fld_Path/log_Deployment.txt
  49. else
  50.         echo createFolders not found
  51. fi
  52.  
  53. cd $dest_Fld_Path/scripts
  54. if [ -x $source_Fld_Path/Unix_Scripts/commonRPASScript.sh ]
  55. then
  56.         echo -e `date +%Y-%m-%d-%T` "[master_unix] commonRPASScript found\n" >>  $source_Fld_Path/log_Deployment.txt
  57.         cp $source_Fld_Path/Unix_Scripts/commonRPASScript.sh $dest_Fld_Path/scripts
  58.         echo -e `date +%Y-%m-%d-%T` "[master_unix] commonRPASScript copied successfully\n" >>  $source_Fld_Path/log_Deployment.txt
  59.  
  60.         dos2unix commonRPASScript.sh
  61.         echo -e `date +%Y-%m-%d-%T` "[master_unix] dos2Unix on commonRPASScript successful\n" >>  $source_Fld_Path/log_Deployment.txt
  62.  
  63.         chmod 777 commonRPASScript.sh
  64.         echo -e `date +%Y-%m-%d-%T` "[master_unix] chmod on commonRPASScript successful\n" >>  $source_Fld_Path/log_Deployment.txt
  65. else
  66.         echo commonRPASScript not found
  67. fi
  68.  
  69.  
  70. if [ -x $source_Fld_Path/Unix_Scripts/loadScriptsWrapper.sh ]
  71. then
  72.     echo -e `date +%Y-%m-%d-%T` "[master_unix] loadScriptsWrapper found\n" >>  $source_Fld_Path/log_Deployment.txt
  73.         cp $source_Fld_Path/Unix_Scripts/loadScriptsWrapper.sh $dest_Fld_Path/scripts
  74.         echo -e `date +%Y-%m-%d-%T` "[master_unix] loadScriptsWrapper copied successfully\n" >>  $source_Fld_Path/log_Deployment.txt
  75.  
  76.         dos2unix loadScriptsWrapper.sh
  77.         echo -e `date +%Y-%m-%d-%T` "[master_unix] dos2Unix on loadScriptsWrapper successful\n" >>  $source_Fld_Path/log_Deployment.txt
  78.  
  79.         chmod 777 loadScriptsWrapper.sh
  80.         echo -e `date +%Y-%m-%d-%T` "[master_unix] chmod on loadScriptsWrapper successful\n" >>  $source_Fld_Path/log_Deployment.txt
  81. else
  82.         echo loadScriptsWrapper not found
  83. fi
  84.  
  85. #unix script to automate PL-SQL deployment
  86. cd $source_Fld_Path
  87.     #dos2unix PLSQL_deployment.sh
  88.     #echo -e `date +%Y-%m-%d-%T` "[master_unix] dos2Unix on PLSQL_deployment.sh successful\n" >>  $source_Fld_Path/log_Deployment.txt
  89.     #chmod 777 PLSQL_deployment.sh
  90.     #echo -e `date +%Y-%m-%d-%T` "[master_unix] chmod on PLSQL_deployment.sh successful\n" >>  $source_Fld_Path/log_Deployment.txt
  91.     #./PLSQL_deployment.sh >>  $1/log_Deployment.txt #check once
  92.     #echo -e `date +%Y-%m-%d-%T` "[master_unix] Execution of PLSQL_deployment.sh successful\n" >>  $source_Fld_Path/log_Deployment.txt
  93.  
  94. #checking whether DDL has to be executed or not
  95. if [ $3 == "Y" ]
  96. then
  97.     sqlplus -s  $1/$2 << EOF >>  $source_Fld_Path/log_Deployment.txt
  98.     @$source_Fld_Path/Oracle/scripts/DDL/Initial_Load/DDL.sql
  99. EOF
  100.     echo -e `date +%Y-%m-%d-%T` "[master_unix] Ddl execution successful\n" >>  $source_Fld_Path/log_Deployment.txt
  101. else
  102.     echo -e `date +%Y-%m-%d-%T` "[master_unix] Ddl execution not required\n" >>  $source_Fld_Path/log_Deployment.txt
  103. fi
  104. #Running DMLs and PROCs
  105. for i in `ls -1 $source_Fld_Path/Oracle/scripts/DML/*.sql`
  106.     do
  107.     sqlplus -s  $1/$2 << EOF >>  $source_Fld_Path/log_Deployment.txt
  108.     @$i
  109. EOF
  110. done
  111. echo -e `date +%Y-%m-%d-%T` "[master_unix] DML execution successful\n" >>  $source_Fld_Path/log_Deployment.txt
  112. for i in `ls -1 $source_Fld_Path/Oracle/scripts/Procedures/*.sql`
  113.     do
  114.     sqlplus -s  $1/$2 << EOF >>  $source_Fld_Path/log_Deployment.txt
  115.     @$i
  116. EOF
  117. done
  118. echo -e `date +%Y-%m-%d-%T` "[master_unix] PROCEDURES execution successful\n" >>  $source_Fld_Path/log_Deployment.txt
  119. #deployment script
  120.     dos2unix deploymentScript.sh
  121.     echo -e `date +%Y-%m-%d-%T` "[master_unix] dos2Unix on deploymentScript successful\n" >>  $source_Fld_Path/log_Deployment.txt
  122.     chmod 777 deploymentScript.sh
  123.     echo -e `date +%Y-%m-%d-%T` "[master_unix] chmod on deploymentScript successful\n" >>  $source_Fld_Path/log_Deployment.txt
  124.     dos2unix exportScenario.prop
  125.     echo -e `date +%Y-%m-%d-%T` "[master_unix] dos2Unix on exportScenario successful\n" >>  $source_Fld_Path/log_Deployment.txt
  126.     chmod 777 exportScenario.prop
  127.     echo -e `date +%Y-%m-%d-%T` "[master_unix] chmod on exportScenario successful\n" >>  $source_Fld_Path/log_Deployment.txt
  128.     ./deploymentScript.sh
  129.     echo -e `date +%Y-%m-%d-%T` "[master_unix] Execution of deploymentScript successful\n" >>  $source_Fld_Path/log_Deployment.txt
  130.  
  131. #summary
in the code above when I am connecting to run dmls or procs it runs one file there and for the next file it gives the above mentioned error. may I know what could be the reason behind it asap.
Jan 6 '15 #1
1 4536
sicarie
4,677 Expert Mod 4TB
So somewhere you use the directory path /opt/SP/we<something> without telling the shell why it's used, or what you want to do with it. There should be a line number associated with the error, which would help you look close to that location (it may be the line before or after; rarely is it much farther away).
Jan 8 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: ncf | last post by:
I'm having an odd problem. I'm getting an error from IDLE saying "End Of Line detected while scanning single-quoted string." Odd thing is, it's not single-quoted, it's one of the doc-strings (if...
8
by: Lyn | last post by:
I am trying to get my head around the concept of default, special or empty values that appear in Access VBA, depending on data type. The Access Help is not much (help), and the manual that I have...
2
by: Serdge Kooleman | last post by:
hi i'm trying to play sounds in my windows app. wav files are in the same folder as .exe if i'm getting path by command: ApplicationPath = Application.StartupPath; and it is look like
0
by: rjain7 | last post by:
Hello, I am a newbie; looking for an easy equivalent of TCL 'unknown' command in python. My basic aim is to be able to pass any command which python interpreter does not understand to my own C++...
1
by: manchin2 | last post by:
Hi, Can anybody please provide the information about "&quot" and its use, if possible please provide an example. ...
4
by: fran7 | last post by:
Hi, from help in the javascript forum I found the error in some code but need help. This bit of code works perfectly, trouble is I am writing it to a javascript function so the height needs to be in...
0
by: Alexnb | last post by:
Hello Lets say I have a string: --a href="/browse/brick"--brick--/a-- The -- needs to be replaced with < or where applicable. and I want the "brick" out of that string (the second brick...
0
by: Alexnb | last post by:
Alexandr N Zamaraev wrote: I'm sorry, I don't think I was being clear. I replaced the <'s with -- so it would post online w/o actually making a link. I just need to know how to get the "brick"...
1
by: Omendra | last post by:
Hi, I am using SQL Server 2005 and i am using Stored Procedure something like :- I am getting error:- Msg 170, Level 15, State 1, Line 18: Incorrect syntax near 'MAX'. DECLARE @jid AS...
3
by: kimong5145 | last post by:
I keep getting this error warning: unknown escape sequence '\H' for this line strAuthor - " Albert Einstein"; what did I do wrong? I do not know what i am doing wrong.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.