From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079058315934.tru64-unix-managers.marc@archive.invalid> From: masauso zimba Date: Tue, 20 Jul 1999 17:10:42 +0000 To: tru64-unix-managers Subject: Running SQLPLUS commands from a UNIX script X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079058315934 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--------------605FFB9F63207E531346EBE3" --------------605FFB9F63207E531346EBE3 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit At our site, we are running ORACLE 7.3.4 and we would like to automate running SQLPLUS command scripts. For example the following sqlplus script (list_suppliers.sql); select supplier_no,supplier_name from suppliers; can be executed from the SQLPLUS command line , @list_suppliers. When I want to execute this sqlplus script from a UNIX script (sup_list); #!/bin/sh # sqlplus user/password @list_suppliers exit # # To execute this script from UNIX prompt; $ ./sup_list The result is that the script executes the "sqlplus user/password" command only and remains at the SQLPLUS command prompt. What is the correct syntax to enable execution of SQLPLUS commands within UNIX scripts ? Thanking you in advance. Masauso Zimba. --------------605FFB9F63207E531346EBE3 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit At our site, we are running ORACLE 7.3.4 and we would like to automate running SQLPLUS command scripts.  For example the following sqlplus script (list_suppliers.sql);

select supplier_no,supplier_name from suppliers;

can be executed from the SQLPLUS command line , @list_suppliers. When I want to execute this  sqlplus script from a UNIX script (sup_list);

#!/bin/sh
#
sqlplus user/password
@list_suppliers
exit
#
#

To execute this script from UNIX prompt;

$ ./sup_list

The result is that the script executes the "sqlplus user/password" command only and remains at the SQLPLUS command prompt.

What is the correct syntax to enable execution of SQLPLUS commands within UNIX scripts ?

Thanking you in advance.

Masauso Zimba. --------------605FFB9F63207E531346EBE3--