Skip to content

Commit

Permalink
Adds regex in order to get cf_users number (#2310)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdgonzaleza authored Aug 30, 2022
1 parent 68d897a commit 68b9ce2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/cleanup-integration
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ for stack in $(cf stacks | awk '/INTEGRATION-STACK/ { print $1 }'); do
cf curl -X DELETE "/v3/stacks/$(cf stack --guid $stack)"
done

CF_USERS=$(cf curl /v3/users | grep total_results | grep -o '[0-9]\+')
CF_USERS=$(cf curl /v3/users | grep -oP '(?<="total_results":)[^"]*' |grep -o '[0-9]\+')
USER_PAGES=$(( $CF_USERS / 50 + 1))

for ((i=1; i<=${USER_PAGES}; i++)) ; do
Expand Down

0 comments on commit 68b9ce2

Please sign in to comment.