Skip to content

Instantly share code, notes, and snippets.

@dossy
Created February 27, 2011 03:13
Show Gist options
  • Save dossy/845872 to your computer and use it in GitHub Desktop.
Save dossy/845872 to your computer and use it in GitHub Desktop.
#!/bin/sh
# set -x
cmd=`php -r "require('$1');
echo escapeshellcmd(sprintf('mysql %s %s %s %s',
'-h' . DB_HOST, '-u' . DB_USER, '-p' . DB_PASSWORD, DB_NAME));"`
# echo $cmd
exec $cmd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment