Examples of Three Musketeers selected

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.