psql

Run a query in batch mode:

psql -Aqtc "SELECT 1;" database