Q: Changing the dhcp IP range in Virbr0's XML file using virsh in bash script I need to change the dhcp range of Virbr0's XML configuration file within a bash script. It can be changed using the command "virsh net-edit default", but I don't know how can it be done from a bash script. 
Any help or explanation of the question asked would be highly appreciated. 
Thank you in advance for your concern. :)

A: net-edit invokes the editor set in EDITOR, so you should be able to set that to a non-interactive editor:
EDITOR='sed -i s/foo/bar/g' virsh net-edit default

Depending on how exactly virsh invokes it, you may have to wrap your editing code in a script that modifies the filename given in "$1", then set EDITOR to that script. 
