Extract IP address :
Method ①:
" : " " " -f1
ifconfig: The command that displays or configures the network device is followed by the device name.
The Ifconfig eth3 is displayed as follows:
grep: followed by a regular expression that displays the rows that appear in the regular expression
The Ifconfig eth3|grep bcast is displayed as:
cut:-D followed by the number after the delimiter-F indicates the first data to get the split
Ifconfig eth3|grep bcast|cut-d ":" After-f2 shown as:
Ifconfig eth3|grep bcast|cut-d ":"-f2|cut-d ""-f1 then acquired the IP address
Awk Small Example
From http://www.cnblogs.com/xupeizhi/archive/2012/07/23/2605371.html
① output file contains rows that conform to a regular expression
awk '/111*/' text output text file contains rows that conform to the 111* field
② the nth field of each row in the output file
awk ' {print '} ' text output text file in the first field of each line
awk ' {print $1,$3} ' text output text is separated from the first and third fields in each line
"Linux" text extraction