SunOS solftden04 5.10 Generic_150400-38 sun4v sparc sun4v
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
PL/SQL Release 12.1.0.2.0 - Production
CORE12.1.0.2.0Production
TNS for Solaris: Version 12.1.0.2.0 - Production
NLSRTL Version 12.1.0.2.0 - Production
So I'm trying to run a script in Solaris unix, which calls a case statement to generate a menu.
Within the menu, depending on what you select, will either run a unix script, or a combination of unix and sql.
But when I execute it I get the following error.
syntax error at line 49 : `<
Here is the shell script.#!/usr/bin/ksh -xv################################################### Script created 14 Nov 2016# Automating the promote process# V1.0 initial trial# Script will run the promote script, then compile the specified packages (Non prompted for the is version)# Then it will run utlrp to recompile all objects.## Add revisions to this area#------------------------------------------------------------------------------------------------------------# 11/28/2016 Removed individual scripts. Added menu driven functionality to allow all or partial process.##################################################clear;echo "###################################################################"echo ""echo " Enter 1 to run the full promote process "echo " Enter 2 for migacp and utilrp "echo " Enter 3 for utilrp only "echo ""echo "###################################################################"echo "ENTER YOUR CHOICE:"read NUMecho ""echo ""echo ""echo ""#case $NUM in #1) /ccia/global/bin/promote #/home/wcis50/work/migacp #sqlplus system/xxx<
For those that don't know, the dash in front of the EOF allows the trailing EOF to have tabs in front of it so you can keep your code formatted. Otherwise the trailing EOF MUST be at the very beginning of a line.
Some history of the script. The actual sql is supposed to run as sysdba. So (AGAINST MY JUDGEMENT) I had it as the following, and it was failing.sqlplus /nolog <
As you can see in the code, I have a whole section commented out. That is the ACTUAL script. The bottom portion is me just trying to simplify and narrow. I took out the formatting option of the EOF and put the trailing EOF at the beginning of the line. I replaced the sqlplus /nolog with the system user and password. I also tried it as my own user and password. But these all still throw the same error.
What am I overlooking?