I have to admit, I generally dont do it that way because I like more control over the *possible* outputs.
So I'll often so something like:
print "
connect u/p
set pages 0
set feedback off
set ... [whatever you need]
select ...
sqlplus -s -l /nolog 1>output.log 2>&1
if [ "`grep 'ORA-' output.log`" ] ;then
email oracle error
fi
if [ "`grep 'SP2-' output.log`" ] ;then
email sqlplus error
fi
etc etc
Once I've exhausted things I'm checking for, the remainder is the output I need, ie
OUTPUT=`cat output.log`
If its only a subset of the output I'm interested in, I'll just filter by that, eg
OUTPUT=`grep 'SPECIAL_VAR' output.log`
etc
Hope this helps. But for me - the most critical thing is not progressing unless I'm super confident the sqlplus component completed successfully.