if [ $(MysqL -N -s -u root -p -e \ "select count(*) from information_schema.tables where \ table_schema='db_name' and table_name='table_name';") -eq 1 ]; then do something else echo "table <table_name> does not exist" exit 1 fi
> -N跳过列名> -s表示非表格输出