#!/bin/sh# BY kerryhu# MAIL:king_819@163.com# This is a script that automatically modifies the network ip, mask, and gateway. #方法方法ip_mod IP_MOD, MASK_MOD, GW_MOD# Example: ip_mod 10.10.10.5 255.255.255.0 10.10.10.1
#where IP_MOD, MASK_MOD, GW_MOD are ip, mask, gw# to be changed to set variable PROC= /bin/sedIP_PATH=/etc/sysconfig/network-scripts/ifcfg-eth0GW_PATH=/etc/sysconfig/networkIP_PRI=`grep -i ipaddr $IP_PATH|
Awk -F "=" '{printf $2 }'`MASK_PRI=`grep -i netmask $IP_PATH|
Awk -F "=" '{printf $2}'`GW_PRI=`grep -i GATEWAY $GW_PATH|
Awk -F "=" '{printf $2}'`IP_MOD=$1MASK_MOD=$2GW_MOD=$3
#Modify ip, mask, gw$PROC -i "s/$IP_PRI/$IP_MOD /g" $IP_PATH$PROC -i "s/$MASK_PRI/$MASK_MOD/g" $IP_PATH$PROC -i "s/$GW_PRI/$GW_MOD/g" $GW_PATH
#Restart NIC /etc/rc.d/init.d/network restart
IAP, the full name is In-Application Programming, Chinese is interpreted as Programming in the prog
The web server avoids some unnecessary troubles. You can not display the version information of apa
For ease of use, we will save the Xshell session. How to transfer the session information saved on
In different Linux distributions, there will be different GUI programs that can display various syst
Talk about the shell ">/dev/null 2>&1"
Linux shell awk process control statement (if, for, while, do) details
How to install directadmin on VPS
Getting Started with Linux Programming - Threading
Method of operating a Bluetooth phone in the Linux operating system, the so-called
Xshell configuration file backup tutorial
How to safely delete PV physical volumes (hard disks or partitions) in Linux LVM
WebLogic installation and configuration on Linux operating system
Linux system security performance check small note
Linux installation method Telnet setting method
Graphic mode and text mode switch between Linux installations
Windows10 installation methods and tips
What should I do if the Windows 10 official version of the font is garbled as a square?
Windows Mail can not receive mail prompt 0x800CCC0E error resolution
13 features that Windows 8 systems have to say
Win7 common taskbar lost method of retrieving
IIS server to do 301 permanent redirection settings explain
New Win10 preview version weekly push, or for Build 10164
Win7 Quick Find Files Common Tips