Scripting Question:
How to connect to Oracle database, execute a script and assign its output to a shell variable?
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
set pagesize 0 feedback off verify off heading off echo off;
select max(cust_id) from cutomers
exit;
END`
echo $count
Previous Question | Next Question |
How to disable back button in Mozilla? | Explain how to load .so (in linux), DLL in windows in PERL? |