Skip to content

Instantly share code, notes, and snippets.

@Hodgy
Created April 26, 2017 22:11
Show Gist options
  • Save Hodgy/e6a7962e52b3926c2ece3f4c9d5cb585 to your computer and use it in GitHub Desktop.
Save Hodgy/e6a7962e52b3926c2ece3f4c9d5cb585 to your computer and use it in GitHub Desktop.
list all the mysql containers, get the info about them, and print only the DSN for each one
dokku mysql:list | awk '!/NAME/{print $1}' | xargs -I % dokku mysql:info % | awk '/Dsn:/{print $2}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment