I would like to redirect output of command line in for loop as $line.
Output should be processed as line but instead it throw whole output.
Could somebody help me on how to redirect output of command line and process it line by line without sending output to any file.
below is my code
result=`${HOME}/sqlplus << EOF
command
select * from xyz;
exit
EOF`
###############################
for line in ${result}
do
echo $line
echo ${result} | grep xxx
Now
${HOME}/sqlplus << EOF
command
select * from xyz;
exit
produce output like below .
xxx yyyy 11111 22222
xxx yyyy 33333 44444
aaa bbbb 5555 66666
aaa bbbb 7777 99999