I want to store row results of a query in array in unix scripting.
I tried this :
array=`sqlplus -s $DB <<eof
select customer_id from customer;
eof`;
When i tried to print it , it shows me this result:
echo ${array[0]};
CUSTOMER_ID ----------- 1 2 51 52 101 102 103 104 105 106 108 11 rows selected.
But I want to store each row as an element by excluding column_name and that "11 rows selected" sentence.
Thanks in Advance.