最后实验成功的方法是:将mysqladmin的警告信息重定向到/dev/null,忽略掉告警信息。
Com_select)
result=`/usr/bin/mysqladmin -u$MYSQL_USER -h$MYSQL_HOST -p${MYSQL_PWD} -S $MYSQL_SOCK extended-status 2>/dev/null|grep -w "Com_select"|cut -d"|" -f3`
echo $result
;;
在原有命令中加上2>/dev/null 就行了。
Warning: Using a password on the command line inte
原文:https://blog.51cto.com/13120271/2381346