In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "introduction to the usage of sort sorting command in Linux system". In daily operation, I believe many people have doubts about the introduction of sort sorting command in Linux system. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "introduction to the usage of sort sorting command in Linux system". Next, please follow the editor to study!
The function of the sort command is to sort lines in the file. The sort command has a number of very useful options that were originally used to sort the contents of files in database format. In fact, the sort command can be thought of as a very powerful data management tool for managing files with similar database records.
The Sort command sorts the contents of the file line by line, and if the first character of the two lines is the same, it will continue to compare the next character of the two lines, and if it is the same, it will continue to compare.
Syntax:
Sort [options] file
Description: the sort command sorts all lines in the specified file and displays the results on standard output. If you do not specify an input file or use "-", the sorted content comes from standard input.
Sort sorting is done based on a comparison of one or more keywords extracted from the input line. The sort keyword defines the smallest sequence of characters used to sort. By default, the entire behavior keyword is sorted in ASCII character order.
The main options for changing the default settings are:
-m merge files if the given files are sorted.
-c checks whether the given files are sorted, and if they are not all sorted, print an error message and exit with a status value of 1.
-u only one of the rows that are considered to be the same after sorting.
The-o output file writes the sorted output to the output file instead of standard output. If the output file is one of the input files, sort writes the contents of the file to a temporary file, and then sorts and writes the output results.
The main options for changing the default collation are:
-d is sorted in dictionary order, and only letters, numbers, spaces, and tabs make sense when compared.
-f treat lowercase letters the same as uppercase letters.
-I ignores non-print characters.
-M as a month comparison: "JAN"
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.