One linux command per day: uniq

Source: Internet
Author: User
The uniquniq command of a linux command every day is used to remove repeated row output from the file. (Do not change the original file) uniq -- help can be used to view command parameters. Uniqfile1 shows the content in file1, and the repeated rows are only displayed once. Uniq-cfile1 shows content in file1 ,...
The uniq command of a linux command every day is used to remove repeated row output from the file. (Do not change the original file) uniq -- help can be used to view command parameters. Uniq file1 shows the content in file1, and repeated rows are only displayed once. Uniq-c file1 shows the content in file1, and the repeated rows are only displayed once. List the number of times that the row appears in the file before each row. Uniq-d file1 only displays the duplicate rows in file1, and the duplicate rows are only displayed once. Www.2cto.com uniq-D file1 only displays the repeated rows in file1, and all the repeated rows are displayed. Uniq-f 2 file1 ignores the first two words of each row and displays the content in file1. duplicate rows are only displayed once. Uniq-I file1 ignores the size and displays the content in file1. duplicate rows are only displayed once. Uniq-s 5 file1 ignores the first five letters of each row. the content in file1 is displayed only once. Uniq-u file1 only displays non-duplicate rows in file1. Uniq-w 5 file1 only compares the first five letters of each row. the content in file1 is displayed. Author: CrazyNemo
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.