Need help in echo output

Hi All,

I have code to get the UUID and capacity for the LUN from CX -arry. I need the output in this format

LUN Number    UUID                                                      Space in MB
 
LUN 238 60:06:01:60:C2:56:11:00:28:36:67:59:11:04:DE:11 122880

But Now iam getting this output format

LUN 270
 
60:06:01:60:C2:56:11:00:E6:B2:3D:C5:11:04:DE:11
307200

Code for this script is

***********************************************
host=$1 
array=$2
for f in `cat /opt/emc/cxarray/${host}`
do
  echo LUN ${f}
  naviseccli -h ${array} getlun $f -uid |awk '{print $2}'
  naviseccli -h ${array} getlun $f |grep "LUN Capacity(Megabytes)"|awk '{print $3}'
done
***************************************************

Example from array file ?
if input line include spaces, for is not easy. While is better

while read line
# or while read var1 var2 var3 endstr
do
    # you can set line to array
    flds=($line)
   # or set -A flds -- $line # => $1 is 1st fld and $* is all and $# is number of values
    echo 1st value is ${flds[0]}
    #...
done < /opt/emc/cxarray/$host
 
echo -n LUN ${f}
naviseccli -h ${array} getlun $f -uid |awk '{printf(" %s ",$2)}'
naviseccli -h ${array} getlun $f |grep "LUN Capacity(Megabytes)"|awk '{print $3}'

---------- Post updated at 01:37 PM ---------- Previous update was at 01:20 PM ----------

This is called useless use of cat

 
for f in `cat /opt/emc/cxarray/${host}`

use

 
while read f
do 
...
...
done < /opt/emc/cxarray/${host}

thanks works great