if脚本linux
来源:互联网 发布:麦子学院软件测试 编辑:程序博客网 时间:2024/06/05 20:24
while true
do
rtlcfg -i
rtlcfg -f -p 1 -s 1 -d 0
rtlcfg -f -p 2 -s 1 -d 0
isexist=`ping 192.168.0.100 -c 4|grep "bytes from"`
if [ -n "$isexist" ]
then
echo "ok remote host in network"
break;
fi
do
rtlcfg -i
rtlcfg -f -p 1 -s 1 -d 0
rtlcfg -f -p 2 -s 1 -d 0
isexist=`ping 192.168.0.100 -c 4|grep "bytes from"`
if [ -n "$isexist" ]
then
echo "ok remote host in network"
break;
fi
done
mysql_bin=${mysql_in}/bin/mysqlmysql_user=rootmaster_file=$(${mysql_bin} -u"${mysql_user}" -e "show master status\G" | grep "File:" | awk -F ': ' '{printf $2}')slave_file=$(${mysql_bin} -u"${mysql_user}" -e "show slave status\G" | grep "Master_Log_File:" | awk -F ': ' '{printf $2}')slave_relay_file=$(${mysql_bin} -u"${mysql_user}" -e "show slave status\G" | grep "Relay_Log_File:" | awk -F ': ' '{printf $2}')echo $master_fileecho $slave_fileecho $slave_relay_filelist=`ls /mnt/data/mysql-arm/var/mysql-bin.0*`for i in $listdoecho $iif [ "$i" = "$master_file" ] thenecho "==master_file"else if [ "$i" = "$slave_file" ] thenecho "==slave_file"elserm $ififidonelist=`ls /mnt/data/mysql-arm/var/CRong-relay-bin.0*`for i in $listdoif [ "$i" = "$slave_relay_file" ] thenecho "==slave_relay_file"else rm $ifidone
0 0
- if脚本linux
- linux shell脚本之if
- Linux 脚本 的 if 判断
- linux shell脚本之if判断
- linux shell 脚本之【2】if详解
- linux脚本中if参数含义
- Linux shell脚本之 if条件判断
- Linux脚本参数之if fi
- linux shell脚本 case和if语法
- Linux脚本参数之if fi
- Linux-shell脚本-if语句/case语句
- Linux脚本编程之if判断语句
- [Linux] shell脚本之if判断
- Linux脚本(shell)编程(五) if 条件判断
- Linux shell脚本——if运算例子
- Linux shell脚本编程if语句的使用方法(条件判断)
- Linux Shell 脚本学习,read、if、test、until记录
- Linux Shell脚本应用——使用if判断结构
- Android组件(一)-Calendar、DataPickerDialog、PreferenceActivity、CoordinatorLayout
- cocoaPods导入第三方后不提示的解决方法
- ubuntu下导入导出.sql
- window平台创建GYP构建环境笔记
- Android之网络编程(二)使用 HttpURLConnection
- if脚本linux
- Android SDK镜像服务器
- JQuery取消和注册对象Click事件同时防止多播委托
- Linux FTP服务器 vsftp
- spring+spring mvc +mybatis项目创建
- Ajax原生态
- IOS截屏一个UIView,以png或者jpg格式保存到指定目录下
- Android webview的使用
- Access与SQL中的IsNull(),IS NULL的区别