SHARE
TWEET

Untitled

a guest Jan 12th, 2017 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. I am new to Unix and  am trying to store output of one sql query in a unix array.
  2.    
  3. #bin/bash
  4. myarray=`sqlplus -s username/password@sid <<eof
  5. set heading off;
  6. set feedback off;
  7. set pagesize 0;
  8. set echo off;
  9. set linesize 1000;
  10. select department from  Customer;
  11. eof`
  12.  
  13. for ((i=0; i<${#myarray[@]}; i++))
  14. do
  15. echo ${myarray[$i]}
  16. done
  17. exit;`
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top