henplus icon indicating copy to clipboard operation
henplus copied to clipboard

Silent feature similar to SQLPlus

Open tbk303 opened this issue 14 years ago • 0 comments

It would be of great help if there was a -silent or -s option on the comand line like in SQLPlus that would remove all the gratuitous output like the startup output, the prompt and the timing so that it only outputs the result of the query, nothing else.

I mainly need this so I can select a value from a database column directly into a Unix environment variable. This would be an example -

!/bin/sh

VALUE=henplus -silent user/password@instance <<END set-property sql-result-showheader off set-property sql-result-showfooter off set-property column-delimiter "" select max(c1) from t1; exit END if [ -z "$VALUE" ]; then echo "No rows returned from database" exit 0 else echo $VALUE fi

tbk303 avatar Dec 30 '10 14:12 tbk303