Are "exp" and "imp" binary programs, shell scripts, or oracle procedures?
Do the "$" parameters to "exp" and "imp" come from the shell parameters or are they part of the syntax. If they are between single quote characters they will not be substituted by shell.
Btw. Your main syntax errors are because you have not declared shell procedures correctly.
For example (one of three places with the problem):
There were a number of issues (missing "then", orphaned "elif" , wrong answer displayed etc.). In the end it is much easier to use a "case" statement for the options.
For rapid testing I have surrounded this example menu in a do-done loop and removed lots of "exit" statements. There are now no "else" or "elif" statements in the script which makes it much easier to follow.
@gcvinayak
Please start a new thread in future. Just realised that this is a completely different subject.
I'm using the below statements in my script
if && then
sqlplus sysadm/abcdefgh12@${dbarr} @/u1/scripts/ResetPswd.sql
elif then
for idx in 0 1 2 3 4 5 6 7
do
sqlplus sysadm/abcdefgh12@${dbarr} @/u1/scripts/ResetPswd.sql
done
else
exit
fi
It give me... (5 Replies)
Hi
I am reading a book about Fortran 90 and I write the following code, to test my understanding of the first chapter. I have a problem with the last section of the code with deals with an IF, ELSEIF, and GOTO statements. Here is my Code
PROGRAM sim
! This code is used to solve two... (3 Replies)
Hello,
I am relatively new to UNIX scripting and am learning a lot. I have already tried several searches on this website and have tried various syntax options suggested to no avail. I am obviously not writing the script correctly. I really do appreciate any and all the help.
Below is an... (8 Replies)
Hi all,
This is my first post in this forum, can i request you to guide, where i am going wrong with the error below.
34: Syntax error: "fi" unexpected (expecting "then")
#!/bin/sh
argCount=0
mysql_path=$USER_INSTALL_DIR$
for i in $*; do
/A argCount+=1
done
if ;then
echo... (2 Replies)
I have been using the if statement in csh like this
if ( $opt1 == 1 ) then
.....
elseif ( $opt2 == 1 ) then
......
endif
Seems to work, but got
Badly placed ()'s.
When I used a space in the elseif, a space between the 'else' and the 'if' it worked (0 Replies)