Skip to content

Instantly share code, notes, and snippets.

@eerien
Created September 2, 2014 03:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eerien/bb30678f2fce8578189b to your computer and use it in GitHub Desktop.
Save eerien/bb30678f2fce8578189b to your computer and use it in GitHub Desktop.
A script to get any status variable value
#!/bin/bash
echo "show global status where Variable_name='$4';" | mysql -h$1 -u$2 -p$3 -N | awk '{print $2}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment