方法一:
ksql -At xxx -c "select datname from sys_database"|grep -v -E 'TEST|TEMPLATE1|TEMPLATE0|SAMPLES|TEMPLATE2'|awk '{sum=sum","$1} END {print sum}'
方法二:
ksql -At xxx -c "select datname from sys_database"|grep -v -E 'TEST|TEMPLATE1|TEMPLATE0|SAMPLES|TEMPLATE2'|awk '{print $1}'|xargs |sed 's/ /,/g'