Pure command line tool

Hi,
We are looking for a command line tool in order to connect to a database that has a JDBC driver. Using the system console to execute SQL sentences, DDL sentences or scripts could be convenient, specially if you can choose an output format for the result (CSV or XML, for example). Besides, an interactive console could be useful. These features are available using the GUI but it seems that there is not a command-line tool in DBeaver.
We are looking for a command line tool in order to connect to a database that has a JDBC driver. Using the system console to execute SQL sentences, DDL sentences or scripts could be convenient, specially if you can choose an output format for the result (CSV or XML, for example). Besides, an interactive console could be useful. These features are available using the GUI but it seems that there is not a command-line tool in DBeaver.