Skip to content

Instantly share code, notes, and snippets.

@lewang
Created July 26, 2017 14:37
Show Gist options
  • Save lewang/9db6b4836c8e358d677d5d4aa9919ef5 to your computer and use it in GitHub Desktop.
Save lewang/9db6b4836c8e358d677d5d4aa9919ef5 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash -x
function getUsage()
{
echo $(ps -A -o "%cpu command" | grep com.docker.hyperkit | grep -v grep | head -1 | cut -f1 -d.)
}
while [ $(getUsage) -gt 50 ]; do
sleep 3
done
say "docker is done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment