diff --git a/misc/build.func b/misc/build.func index 4ab2a1b7..6a344898 100644 --- a/misc/build.func +++ b/misc/build.func @@ -744,7 +744,7 @@ config_file(){ exit fi - LIST_OF_IDS=$( pvesh get /cluster/resources --type vm --output-format json | jq '.[] .vmid' -r) + LIST_OF_IDS=$(pvesh get /cluster/resources --type vm --output-format json | grep -oP '"vmid":\s*\K\d+' ) for ((ID=MIN_ID; ID<=MAX_ID; ID++)); do if ! grep -q "^$ID$" <<< "$LIST_OF_IDS"; then @@ -757,7 +757,7 @@ config_file(){ elif [[ "$CT_ID" =~ ^[0-9]+$ ]]; then - LIST_OF_IDS=$( pvesh get /cluster/resources --type vm --output-format json | jq '.[] .vmid' -r) + LIST_OF_IDS=$(pvesh get /cluster/resources --type vm --output-format json | grep -oP '"vmid":\s*\K\d+' ) if ! grep -q "^$CT_ID$" <<< "$LIST_OF_IDS"; then echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}" else