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 -> Problem with running saqlplus in shell script

Problem with running saqlplus in shell script

From: Joe Condle <condle_at_mars-systems.com>
Date: 2000/04/20
Message-ID: <38FF1BA9.915C55A8@mars-systems.com>#1/1

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