Run queries from BASH

BASH is not used often for interrogating a database, but it can be done. It would not be regarded as secure to have passwords embedded in the command, but this can be extracted to a file protected by appropriate permissions.