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 h
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.