My reply was probably a bit too brief. The most robust way for doing this
would be to use pattern matching utilities such as sed and awk (Perl? What's
Perl?) to parse that output for stuff like
ORA- (N is a digit of a number)
TNS-
SP-
etc.
But for a quick and dirty approach, select a
-- I don't know if a return value can be gathered in a
-- shell variable except by using ` chars.
Sorry, Stephen had already mentioned one other way:
} | while read DOINK LINE; do
if [ "$DOINK" = "DOINK" ]; then
DBNAME="$LINE" # << Will do.
I take back that stateme
Thanks Stephen,
The reason for using ` characters was because I wanted the output
(a filename) in a variable. After that, the variable would be
passed to other scripts for file creation, FTP etc. I don't know
if a return value can be gathered in a shell variable except by
using ` chars.
I was try
Rather than try to get output using the ` characters, see what you can do
with this method:
{
sqlplus -s <<-XXX
$USER/[EMAIL PROTECTED]
set heading off feedback off trims on lines 300 pages
set whatever else
do this;
do that;
do the other thing
Thanks Stephane,
Your solution 3 has done the job for me.
Regards,
Charu.
-Original Message-
Stephane Faroult
Sent: 05 November 2003 18:10
To: Multiple recipients of list ORACLE-L
'Connected.' message?
You have multiple solutions; one would be to use an externally identified Oracle
acc
You have multiple solutions; one would be to use an externally identified Oracle
account; another one to use the hide.c program (should find it with google) to prevent
people from seeing command arguments through 'ps'; another one to write something such
as
myvar=`echo "your stuff here