473,398 Members | 2,525 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,398 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 4543
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.