Created
October 28, 2020 13:04
-
-
Save Stono/e33f4696441a86b7759d1bb2f2f7b245 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TOTAL=$(istioctl proxy-status | tail -n +2 | awk '{print $7}' | wc -l) | |
prog() { | |
local w=100 p=$1; shift | |
pct="$(( $p*$w/$TOTAL ))" | |
printf -v dots "%*s" "$pct" ""; dots=${dots// /.}; | |
printf "\r\e[K|%-*s| %3d %%" "$w" "$dots" "$pct"; | |
} | |
while : | |
do | |
CURRENT=$(istioctl proxy-status | awk '{print $7}' | grep "1.6.12" | wc -l) | |
prog "$CURRENT" | |
if [ "$CURRENT" = "$TOTAL" ]; then | |
echo "" | |
echo "Voilla" | |
exit 0 | |
fi | |
sleep 10 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment