accept a comma separate list of VMs
This commit is contained in:
commit
fbbc91780b
1 file changed
+27
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
lxc() {
|
||||
_LXC="${TARGET:-lxc}"
|
||||
command $_LXC "$@"
|
||||
}
|
||||
|
||||
lxc_list() {
|
||||
lxc list -c n -f csv,noheader "$@"
|
||||
}
|
||||
|
||||
usage() { echo "Usage: ${0##*/} [-l vm1,vm2,...]"; exit 1; }
|
||||
|
||||
main() {
|
||||
while getopts ":l:" opt; do
|
||||
case "${opt}" in
|
||||
l)
|
||||
IFS="," read -r -a LIMIT <<< "$OPTARG"
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in new issue
Block a user