Awk help! Help !! Help !!!

Source: Internet
Author: User
Awk help! Help !! Help !!! -- Linux general technology-Linux technology and application information. for details, refer to the following section. Thank you !!! Please help me write an awk script, that is, to pick out and print the rows in the two data files to the specified file. For example, the students in the two classes took an exam. the number of subjects for the exam was the same (Chinese, mathematics, English, and physics), and the scores of some specific students were selected. The requirement is that the scores of these students in the same subject are only 2 points different (do not bother ). Let me give you an example: the score of Class A students is represented by file A, and the score of class B is represented by file B,
File A is:
Physical name of Chinese, mathematics, and English
95 94 93 92 Zhang San
85 84 83 82 sheets 4
75 74 73 72 Zhang Wu
65 64 63 62 sheets 6
File B is:
99 90 97 98 Li Si
87 82 85 80 Li Wu
80 70 63 82 Li Liu
70 68 68 72 Li Qi
It is a little troublesome to implement this algorithm. we need to compare the records of each domain in two files cyclically: the numbers in each column in the first row in the first file and the corresponding columns in all rows in the second file, the second and third columns of the first file .... Compare the rows of the second file in sequence with those of the second file. I am new to awk and feel that the header is too big. thank you for your help !!! I am willing to pay a certain amount, QQ: 114669870, mail: wangjt3235@yahoo.com.cn.
Related Article

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.