List databases that match a pattern:
psql -c "\l" | grep <pattern>
Drop a database from the command line:
psql -c "drop database <database>"
Describe a table from the command line:
psql -d <database> -c "\d <schema>.<table>"
\l - list databases
\dt - list tables
\d <table> - describe table
List tables in schema:
\dt schema.