随笔分类 -  shell

摘要:#!/bin/basha=`ifconfig eth0 | grep 'inet addr' | awk -F: '{print $2}' | awk -F. '{print $1}'`b=`ifconfig eth0 | grep 'inet addr' | awk -F: '{print $2} 阅读全文
posted @ 2018-02-08 22:39 Leonardo-li 阅读(787) 评论(0) 推荐(0) 编辑
摘要:vim /root/rj.sh #!/bin/bashread -p "请输入你要查询的软件名称:" aif [ `rpm -qa | grep $a | wc -l` -ne 0 ]then echo "yes"else echo "no" fi 阅读全文
posted @ 2017-12-25 17:41 Leonardo-li 阅读(221) 评论(0) 推荐(0) 编辑
摘要:vim /etc/init.d/nginx#!/bin/bash#chkconfig: - 99 22#description: Nginx Server Control ScriptPROG="/usr/local/nginx/sbin/nginx" #主程序路径PIDF="/usr/cocal/ 阅读全文
posted @ 2017-12-20 19:38 Leonardo-li 阅读(431) 评论(0) 推荐(0) 编辑
摘要:vim ip.sh #!/bin/bashread -p "eth:" eread -p "ip:" ip1read -p "netmask:" mask1read -p "route:" route1read -p "dns:" dns1 mac=$(ifconfig $e | grep "HWa 阅读全文
posted @ 2017-12-20 18:49 Leonardo-li 阅读(378) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示