30、终端不打印输出;判断命令是否执行成功;

 

mysqladmin -u${user} -p${password} password "123456" >/dev/null 2>&1

if [ $? -eq 0 ]; then
echo "success"
else
echo "fail"

fi

posted @ 2021-03-17 11:23  WH·xiao  阅读(88)  评论(0编辑  收藏  举报