Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle within a Unix Script
try creating a SQL file with your SQL commands in it and passing that in
from the shell script, ie
sqlplus @filename.sql
this should still prompt your for username/password, and if you include an 'exit' at the end of the sql script you will return to the shell when finished running the SQL.
HTH,
Roy
In article <7ufdtu$l21$1_at_nnrp1.deja.com>,
amerar_at_ci.chi.il.us wrote:
>
>
> Hello,
>
> I have a simple Unix script that logs onto SQL and executes some SQL
to
> spool to a file. Here is a clip:
>
> sqlplus -s /<< EOT 1>/dev/null
> .
> .
> .
> select .....
> .
> .
> from v$filestat x, ts$ ts, v$datafile i, file$ f
> .
> .
> .
>
> The problem is that the Unix script is taking those $ signs and thinks
> they are variables. Is there a way for me to escape them so Oracle
will
> still recognize them???
>
> Arthur
> amerar_at_ci.chi.il.us
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Oct 18 1999 - 12:17:54 CDT
![]() |
![]() |