diff --git a/endpoint-options.sh b/endpoint-options.sh index d2e139e1..aaa809bf 100755 --- a/endpoint-options.sh +++ b/endpoint-options.sh @@ -11,18 +11,14 @@ default_array=() for key in $(jq -r 'keys[]' <<< "$json"); do default_values=$(jq -r ".[\"$key\"].default[]" <<< "$json") default_array+=($default_values) + + for node in "${default_values[@]}"; do + size_in_gb=$($BASEPATH/restore-volumes.sh "$node" --print-size-only) + + if [ $? -eq 0 ]; then + echo "$key;$node;$size_in_gb" + fi + done + done -for node in "${default_array[@]}"; do -#echo "check $node" - size_in_gb=$($BASEPATH/restore-volumes.sh "$node" --print-size-only) - - if [ $? -eq 0 ]; then - echo "$node: $size_in_gb" -# else -# echo "$node can not" - fi -done - -# Print the combined array -#printf "%s\n" "${default_array[@]}"