1,2,3,4,5,6,7,8,9,121:4075
2,4,6,8,7,121:2011
3,3,5,7,9,8,5,8,121:10121
Extract 121:port
The explanations are as follows:
Awk-f "," ' {print $NF} ' Filename-f delimiter is, NF prints the last field
Grep-o ' [0-9]\+:[0-9]\+$ ' filename-o exact match \+ word connection
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/84/8D/wKioL1eUcXXir2gaAAAl6gBtrCk237.png "title=" 2.png " alt= "Wkiol1eucxxir2gaaaal6gbtrck237.png"/>
Obvious grep-o results to be accurate
{"Aid": "$", "path": "Attachment/mon_1112/2_1_5728040df3ab346.jpg"}
Extract 45
Grep-o-E ' aid ': [1-9]* ' tmp.txt note adi ": where": Is the key character
The results are as follows:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/84/8D/wKiom1eUc2bRm87HAAAulbWIC3w202.png "title=" 3.png " alt= "Wkiom1euc2brm87haaaulbwic3w202.png"/>
Where 2.sh content is as follows
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/84/8D/wKiom1eUdQXx83QuAAAG2pvz7c4155.png "style=" float: none; "title=" 4.png "alt=" Wkiom1eudqxx83quaaag2pvz7c4155.png "/>
It is best to generate the following
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/84/8D/wKiom1eUdQWygm0OAAApfvsowe8050.png "style=" float: none; "title=" 5.png "alt=" Wkiom1eudqwygm0oaaapfvsowe8050.png "/>
Cat 2.sh |awk ' {print ' scp-rp./hadoop-2.202 [email protected] "$":/home/hadoop "} '
The first field of 2.sh
How about the children's shoes? Are you clear?
This article is from the "Linux Common Commands Summary" blog, be sure to keep this source http://3146456.blog.51cto.com/3136456/1829362
Examples of Three Musketeers selected