Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: sqlplus within the unix shell
Here's a script from Kenneth C Stahl <BlueSax_at_Unforgettable.com>
that works fine for that:
#!/bin/ksh
MyVar=$(sqlplus -s system/manager <<sqlEOF
whenever sqlerror exit failure;
set feedback off;
set pages 0;
variable id number;
begin
select 1
into :id
from dual;
end;
.
/
print id
exit success;
sqlEOF)
print -u1 $MyVar;
exit 0;
--
Have a nice day
Michel
Eugene Firyago <efiryago_at_bisys.com> a écrit dans le message :
850f5b$m52$1_at_bob.news.rcn.net...
> Is it possible the unix shell to see/handle the result as sqlplus variables
> of a sqlplus script run from within a shell script?
>
> Thanks in advance,
> Eugene.
>
>
>
Received on Thu Jan 06 2000 - 02:33:52 CST
![]() |
![]() |