On 11/30/2013 12:00 PM, Nehal J Wani wrote:
Currently, for redirecting output (most of the times its the output
of
--dumpxml) we use:
virsh $command > $file
But such redirection is not possible in virsh shell. It would be great
if libvirt supported this feature for those who love working in the
'virsh shell' (instead of typing 'virsh' before every command).
A simple approach would be to either add the redirection feature using
'>' or having some option like -o or --outfile (it would be nice if it
is available for each command, and not just restricted to --dumpxml
ones)
Sure - sounds like a welcome addition. Also useful would be supporting
'-' as a synonym for reading from stdin instead of a file name (as in
'virsh dumpxml | some modification script | virsh define -'; but also
usable from 'virsh' batch mode so that you can do 'define -' and then
just type your definition inline).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org