This looks like a blend of bits of unix shell script and Oracle sqlplus commands.
Shell commands do not need a semi-colon at the end of the command unless there is another shell command on the same line.
Commands for sqlplus do need a semi-colon but need to be presented to sqlplus not shell.
There is actually a shell syntax error on most of the lines. The level of problem depends on whether some of the commands should be processed by Oracle sqlplus or not.
What is the script meant to do?
Is there a database involved, or are you trying to run Oracle sqlplus syntax commands in shell?
Guys,, sorry wasn well so unable to reply to all...
@methyl
yes, actually this is blend of unix and db2,,, actually i have fixed the error.. But now the expr command is actually causing a problem..
@sriharsha_kvr
thanks for ur suggestion.. But i need to include a bracket to make sure the order of execution of the operations.. Can you please guide me how to do it?
expr need arguments = argument delimeter between arguments.
It's always commandline = shell parse file generation, ... (in this case *), and ( ) is subshell. So we have to tell for shell = don't parse ( ) *
You can do integer calculation using shell, no need to ex. expr. Only old bsh can't do it.
ksh99, bash, ... can do it, ksh also using floating. Bash, expr, ... only integers.
Shell (all posix compatible sh):
(( value = ( inside_value / 1000 ) * value ))
bc is also real calculator, also floating support, in this case: