mysql -e "" 2>/dev/null #把输出的mysql: [Warning] Using a password on the command line interface can be insecure.内容重定向到空,让输出不显示 mysql: [Warning] Using a password on the command line interface can be insecure.
mysql -e "" 2>/dev/null |awk 'NR==2' #只显示第2行
#TEST="mysql -uxx -hxxxn -pxxx -Pxxx -Dxxx"
#ttt=$($TEST -e "select xxx from xxx where xxx='$xxx'" 2>/dev/null |awk 'NR==2')