The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 06-30-2006
tmarikle tmarikle is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2005
Posts: 683
That is what you are doing with here document enclosed by <<EOF1 and EOF1. The back ticks return the output of the sqlplus command and then, in your case, attempts to execute it.

If you want to capture the output of sqlplus in a variable or an array, then use the back ticks.

Code:
set -A RESULTS_ARRAY `sqlplus -s "user/pwd@service_name" <<EOF1
@xyz.sql
@pqr.sql
@abc.sql
EOF1`

for i in ${RESULTS_ARRAY[@]}
do
    echo $i
done