Scripting Question:

How to connect to Oracle database, execute a script and assign its output to a shell variable?

Tweet Share WhatsApp

Answer:

count=`sqlplus -s $configuser/$configpass@$ORACLE_SID <<END
set pagesize 0 feedback off verify off heading off echo off;
select max(cust_id) from cutomers
exit;
END`
echo $count

Download Scripting PDF Read All 9 Scripting Questions
Previous QuestionNext Question
How to disable back button in Mozilla?Explain how to load .so (in linux), DLL in windows in PERL?