title: How to read a value from .cnf file?
body: <p>What's an efficient bash command to read a value from a .cnf file? I specifically want to return the first password value from /etc/mysql/debian.cnf, which looks like this:</p>
  
  <pre><code>[client]
  host     = localhost
  user     = debian-sys-maint
  password = foo
  socket   = /var/run/mysqld/mysqld.sock
  [mysql_upgrade]
  host     = localhost
  user     = debian-sys-maint
  password = foo
  socket   = /var/run/mysqld/mysqld.sock
  basedir  = /usr
  </code></pre>