How to connect to Oracle database, execute a script and assign its output to a shell variable?
Submitted by: Administratorcount=`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
Submitted by: Administrator
set pagesize 0 feedback off verify off heading off echo off;
select max(cust_id) from cutomers
exit;
END`
echo $count
Submitted by: Administrator
Read Online Scripting Job Interview Questions And Answers
Top Scripting Questions
☺ | How to disable back button in Mozilla? |
☺ | Explain how to execute WScript & WSH object? How will i create WSH objects? |
☺ | Explain how to fetch two values from database into two variables in shell scripting? |
☺ | How to disconnect the vpn client in VB Script? |
Top Scripting language Categories
☺ | AngularJS Interview Questions. |
☺ | Ext-JS Interview Questions. |
☺ | Dojo Interview Questions. |
☺ | Expert Developer JavaScript Interview Questions. |
☺ | jQuery Mobile Interview Questions. |