diff --git a/scripts/oci-cleanup b/scripts/oci-cleanup index 614e454..c11c50c 100755 --- a/scripts/oci-cleanup +++ b/scripts/oci-cleanup @@ -25,14 +25,14 @@ region="${LAB_OCI_REGION:-${OCI_CLI_REGION:-}}" oci_json_ids() { local command_json="$(cat)" - python3 -c 'import json,sys; raw=sys.stdin.read().strip(); data=json.loads(raw) if raw else {}; print("\\n".join(x["id"] for x in data.get("data", [])))' <<<"${command_json}" + python3 -c 'import json,sys; raw=sys.stdin.read().strip(); data=json.loads(raw) if raw else {}; print("\n".join(x["id"] for x in data.get("data", [])))' <<<"${command_json}" } mapfile -t compartments < <( printf '%s\n' "${tenancy}" "${oci_bin}" iam compartment list --compartment-id "${tenancy}" \ --compartment-id-in-subtree true --all --output json 2>/dev/null \ - | python3 -c 'import json,sys; raw=sys.stdin.read().strip(); data=json.loads(raw) if raw else {}; print("\\n".join(x["id"] for x in data.get("data", [])))' + | python3 -c 'import json,sys; raw=sys.stdin.read().strip(); data=json.loads(raw) if raw else {}; print("\n".join(x["id"] for x in data.get("data", [])))' ) declare -a instances=() boot_volumes=() block_volumes=() public_ips=() vcns=()