随笔分类 - 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}
阅读全文
摘要:vim /root/rj.sh #!/bin/bashread -p "请输入你要查询的软件名称:" aif [ `rpm -qa | grep $a | wc -l` -ne 0 ]then echo "yes"else echo "no" fi
阅读全文
摘要:vim /etc/init.d/nginx#!/bin/bash#chkconfig: - 99 22#description: Nginx Server Control ScriptPROG="/usr/local/nginx/sbin/nginx" #主程序路径PIDF="/usr/cocal/
阅读全文
摘要: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
阅读全文