1.6-sort command

Source: Internet
Author: User

Sort command to print a document

SORT/ETC/PASSWD the rows of the content by default in Assic code without parameters

Sort- t:-k3 /etc/passwd to: Sort by delimiter, third paragraph

SORT-T:-k3-n/etc/passwd with: For delimiter, third paragraph to sort numerically (-N numeric sort)

SORT-T:-k3,5-n/etc/passwd with: For delimiter, 3-5 segments for numeric sorting (-k3,5=3-5)

SORT-T:-k3-nr/etc/passwd: As delimiter, the third paragraph is numerically reversed (-R from top to bottom, from big to small)

Sort- u 1.txt sorts the document by default and filters out duplicate rows-u=unique

Note: When-un, sort and filter by numbers, English is ignored, leaving only one line .


1.6-sort command

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.