在使用 DB2CLI 命令时,我们得到 IBM 版权信息和页脚详细信息。是否有任何选项可以抑制页眉和页脚信息?
echo "select CURRENT USER from dual"|db2cli execsql -dsn 'SAMPLE'
输出
PS C:\Users\Desktop> echo "select CURRENT USER from dual"|db2cli execsql -dsn 'SAMPLE'
IBM DATABASE 2 Interactive CLI Sample Program
(C) COPYRIGHT International Business Machines Corp. 1993,1996
All Rights Reserved
Licensed Materials - Property of IBM
US Government Users Restricted Rights - Use, duplication or
disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
> select CURRENT USER from dual
FetchAll: Columns: 1
1
TESTUSER
FetchAll: 1 rows fetched.
>
尝试使用 set headers=off,这通常适用于 jsqsh,但不适用于 DB2CLI,任何线索都值得赞赏。