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 -
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;
if [ -z "$VALUE" ]; then
echo "No rows returned from database"
Contact email - email@example.com
Log in to post a comment.