i have a script & it goes as below,
instant_client="/root/ora_client/instantclient_11_2"
output=`$instant_client/sqlplus -s HRUSER/HRUSER@TOMLWF <<EOF
set heading off
set feedback off
set lines 10000
set pagesize 10000
select count (1) from onboardingcandidates o, candidatedetails c where o.candidateid=c.candidateid and o.JOININGSTATUS='0091' and to_date(o.joiningdate)=to_date(sysdate+5);
EOF
exit
`
query=(`$instant_client/sqlplus -s HRUSER/HRUSER@TOMLWF <<EOF
set heading off
set feedback off
set lines 10000
set pagesize 10000
select o.candidateid from onboardingcandidates o, candidatedetails c where o.candidateid=c.candidateid and o.JOININGSTATUS='0091' and to_date(o.joiningdate)=to_date(sysdate+5);
EOF`)
i=0
echo "Throwing individual arrays:"
while [ $i -lt $output ]
do
a=${query[$i]}
echo Candidate[$i]=$a
i=$(($i+1))
done
OUTPUT:
Throwing individual arrays:
Candidate[0]=cand1
Candidate[1]=cand2
Candidate[2]=cand3
Candidate[3]=cand62
REQUIRED OUTPUT
Everything is working fine.
All i need is, i need 1 output at a time.
i.e. if i run the above script then the output should be controlled.
It should throw 1 output at a time on the prompt.
Is this possible ??
IF YOU NEED ANYTHING MORE THEN PLZ ASK. I HOPE I AM CLEAR WITH MY DOUBT