corriger affichage

This commit is contained in:
Jephté Clain 2014-09-23 11:56:11 +04:00
parent 1b7387ccf7
commit b9fe0d47c3
2 changed files with 4 additions and 4 deletions

4
SKvm
View File

@ -42,9 +42,9 @@ function build_arrays() {
# avms: toutes les vms
# svms: les vms qui sont arrêtées
rvms=()
eval "$(virsh_list | awk '{print $2}' | sort | sed 's/^/array_add rvms /g')"
eval "$(virsh_list | awk '{print $2}' | csort | sed 's/^/array_add rvms /g')"
avms=()
eval "$(virsh_list --all | awk '{print $2}' | sort | sed 's/^/array_add avms /g')"
eval "$(virsh_list --all | awk '{print $2}' | csort | sed 's/^/array_add avms /g')"
svms=()
for avm in "${avms[@]}"; do
array_contains rvms "$avm" || array_add svms "$avm"

View File

@ -31,9 +31,9 @@ function build_arrays() {
# avms: toutes les vms
# svms: les vms qui sont arrêtées
rvms=()
eval "$(VBoxManage -q list runningvms | sort | sed 's/^/array_add rvms /g')"
eval "$(VBoxManage -q list runningvms | awk '{gsub(/[^"]*$/, ""); print}' | csort | sed 's/^/array_add rvms /g')" #"'bug colorisation
avms=()
eval "$(VBoxManage -q list vms | sort | sed 's/^/array_add avms /g')"
eval "$(VBoxManage -q list vms | awk '{gsub(/[^"]*$/, ""); print}' | csort | sed 's/^/array_add avms /g')" #"'bug colorisation
svms=()
for avm in "${avms[@]}"; do
array_contains rvms "$avm" || array_add svms "$avm"