0
点赞
收藏
分享

微信扫一扫

shell脚本连mysql的小技巧

求阙者 2024-03-08 阅读 12

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')

举报

相关推荐

shell 小技巧

Shell脚本for循环小实验

mysql小技巧

shell 脚本mysql 启停

0 条评论