Qshow in Unix
Jones Allen (Van)
allen.jones@artioslink.com
Wed, 11 Mar 1998 18:10:55 -0800
I have the following code to get the instance name of an Oracle database
out of the powerhouse dictionary as follows, where "vpe" is the
powerhouse file name:
curdb="`echo show database vpe summary|qshow|grep ORACLE`"
curdb="`echo $curdb|cut -f3 -d\@|cut -f1 -d\/`"
>From the qshow output "VPE ORACLE ORACLE@dbuser@dev520m/dbpassword", it
extracts "dev520m".
(Note that opening the oracle database this way does not use the
ORACLE_SID environment variable.)
This works, except in off-line processing, I can't prevent qshow from
sending a copy of it's output to the printer. I've tried:
* "export qsholist=/dev/null" before the line that has qshow
* ... echo 'set noprint\nshow database ...
* ... echo 'set report device terminal\nshow database ...
* even the following:
rm -f qshow.disk
echo 'show database vpe summary'|qshow > qshow.disk
curdb="`grep ORACLE qshow.disk`"
curdb="`echo $curdb|cut -f3 -d\@|cut -f1 -d\/`"
rm -f qshow.disk
...nothing seems to stop the printed output.
I'm working on an aix version of unix. The HP-UX operating system does
not do this.
Any help would be appreciated. Thanks