how can I execute shell command from sqlplus
447396Aug 1 2007 — edited Aug 1 2007Hi,
Can you please give me an way out how the command below can be executed :
SQL> begin
2 !(k=`expr $k-1`);
3 end;
4 /
!(k=`expr $k-1`);
*
ERROR at line 2:
ORA-06550: line 2, column 1:
PLS-00103: Encountered the symbol "!" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge
<a single-quoted SQL string> pipe
<an alternatively-quoted SQL string>
With out a begin-end block it is working :
SQL> !k=2
SQL> !(k=`expr $k-1`)
SQL> !(echo $k)
Unix version :
HP-UX hwhpx013 B.11.23 U ia64 1189652653
Regards,
Koushik