The use of sort, uniq, join under Linux

Source: Internet
Author: User

>>>sort commands Common related options:

Options

Description

-C

Checks to see if the file order is sorted, and if it is out of order, it outputs information about the first scrambled row, and then returns 1

-K

Specify the number of columns to sort

-B

Ignores all blank lines preceding each line, starting with the first visible character to compare

-F

Convert lowercase letters to uppercase to sort

-R

Invert Descending

-U

Remove Duplicate rows

-O

Output naming, redirection

-N

Sort by character

-T

Specify delimiter

-M

Sort by Month







[email protected] ~]# Sao Cat A.txt B.txt

1 ABC

2 def

3 Fun

4 Hello

-------

1 Beijing

2 we

3 Fongguang

4

[email protected] ~]# Sao Join A.txt B.txt

1 ABC Beijing

2 Def we

3 Fun Fongguang

4 Hello


The use of sort, uniq, join under Linux

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.