该脚本为,如果满足i 等于mysql、information_schema、performance_schema、db_sys_stat 其中一个那么就跳出执行下面的。
重点介绍:
if 条件语句 [ ] 左右两个都要有一个空格。
#!/bin/bash
#2012-12-25 by cocofor i in `cat ./db_list.txt`
doif [ "$i" == "mysql" ] || [ "$i" == "information_schema" ] || [ "$i" == "performance_schema" ] || [ "$i" == "db_sys_stat" ]; then
continue
else
echo '!!!!!!!!!!!!'; done
标签:information,stat,shell,db,else,linux,performance,schema From: https://blog.51cto.com/u_16152230/6427006