Using a $listofvariable in a command

Hi, after all sorry for my bad english. :frowning:
Im trying to do this in a script (working w/ Virsh).

list=$(virsh list|grep "running"|awk '{print $2}')

now i need to use each of elements of list in the comand:
dominfo domain-id
(Returns basic information about the domain.)

i try this

virsh dominfo $list

but is bad.

I just need do the comand dominfo to each domine running.

any solution? please

I know nothing about virsh but is the variable...

list

or...

lista

?

sorry is list

virsh dominfo $list