Skip to content

Instantly share code, notes, and snippets.

@betawax
Created September 9, 2014 07:30
Show Gist options
  • Save betawax/269a0963218932c388b2 to your computer and use it in GitHub Desktop.
Save betawax/269a0963218932c388b2 to your computer and use it in GitHub Desktop.
Extract a single value from MySQL in Shell
FOOBAR=$(mysql -u [user] [database] -p[password] --skip-column-names -se "SELECT foo FROM bar;")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment