Skip to content

Instantly share code, notes, and snippets.

@jamescarr
Created December 19, 2014 15:02
Show Gist options
  • Save jamescarr/e8c84deba30c8da19395 to your computer and use it in GitHub Desktop.
Save jamescarr/e8c84deba30c8da19395 to your computer and use it in GitHub Desktop.
while [ -n "`docker ps | grep mysql`"]
do
echo "waiting on mysql..."
sleep 6
done
echo "mysql started!"
@jamescarr
Copy link
Author

Output:

╰─$ ./test.sh                                                                                                                                                        18 ↵
waiting on mysql...
waiting on mysql...
waiting on mysql...
waiting on mysql...
waiting on mysql...
waiting on mysql...
waiting on mysql...
waiting on mysql...
waiting on mysql...
./test.sh: line 3: [: missing `]'
mysql started!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment