📜  bash ifelse - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:01.832000             🧑  作者: Mango

代码示例2
# you can use it if you want but it isn't very accurate
# as of best practices and such 

for DB in $( sudo mysql -e 'show databases' -s --skip-column-names ) ; 
    do 
        if [ $DB == 'information_schema' ] || [ $DB == 'performance_schema' ]; 
            then echo 'warning' ; 
        else 
            echo "success $DB";
        fi 
        
    done