make a loop with 3 variables and get the output in a command

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

make a loop with 3 variables and get the output in a command

MODY
dears as below this command only make output for x and y not i variables i need to know why?

     exec 5< <(awk '{IGNORECASE=1}/UID/ {print $2}' TEXT)
     exec 6< <(awk '{IGNORECASE=1}/LOGICAL/ {print $4}' TEXT)
     exec 7< <(awk '{IGNORECASE=1}/UID/ {print $2}' TEXT2)
     exec 8< <(awk '{IGNORECASE=1}/LOGICAL/ {print $4}' TEXT2)
     if [[ $6 == $8 ]]
     then
     while read i <&5 && read x <&6 i && read y <&7 && read z <&8
         do
        echo "naviseccli -h 10.1.1.37 sancopy -create -incremental -name copy_$x -srcwwn $i -destwwn $y -verify -linkbw 2048" >> OUTPUT
     done
     else
     echo " no matched LUN number "
     fi
Reply | Threaded
Open this post in threaded view
|

Re: make a loop with 3 variables and get the output in a command

Guru
Administrator
The chances are that the file being read from for the "i" variable is not having content. Can you post the content of the TEXT file?