Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Problem with running saqlplus in shell script

Re: Problem with running saqlplus in shell script

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/04/20
Message-ID: <956246007.950.0.pluto.d4ee154e@news.demon.nl>#1/1

sqlplus -s will suppress the 'garbage' aka the banner. Basically this is a typic 4letter abbreviation question.

Hth,

Sybrand Bakker, Oracle DBA

Joe Condle <condle_at_mars-systems.com> schreef in berichtnieuws 38FF1BA9.915C55A8_at_mars-systems.com...
> When I run sqlplus from shell scripts I always have to run sed to
> delete the query and other sqlplus output. I am experimenting with a
> couple of things. If I do the following
>
> set echo off
> set verify off
> spool filename
> QUERY
> spool off
>
> I get my ouput with out sqplus garbadge.
>
> If I place the above in a shell script
> #!/bin/sh
>
> DOMAIN=$1
> sqlplus esp >/dev/null <<EOF
> set echo off
> set verify off
> spool filename
> QUERY
> spool off
>
> EOF
> exit 0
>
> My output contains the sqlplus garbadge.
>
> If I call the query from the shell script. The output is fine but I do
> not know how to pass a shell script variable to the sqlplus query. Any
> help would be appreciated.
>
> #!/bin/sh
>
> DOMAIN=$1
> sqlplus esp @lisa.sql <<EOF
> EOF
> exit 0
>
> Joseph P. Condle Jr. condle_at_mars-systems.com Office 412-473-6542
> Senior Systems Engineer Fax 412-473-6538
> Medical ARchival Systems, Inc. (MARS) Pager 412-572-9490
> 1310 Beulah Road Pgh. Pa. 15235 USA
Received on Thu Apr 20 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US