将Check_Mysql_Server()后注释后才能输出是为什么
Check_Mysql_Server() { nc -z -w2 ${Mysql_Slave_Server} 3306 &> /dev/null if [ $? -eq 0 ];then echo "Connect ${Mysql_Slave_Server} OK!" fi }
无任何输出。
#Check_Mysql_Server() #{ nc -z -w2 ${Mysql_Slave_Server} 3306 &> /dev/null if [ $? -eq 0 ];then echo "Connect ${Mysql_Slave_Server} OK!" fi #}
将Check_Mysql_Server(){}用#注释掉才能输出,是为什么?