сортировать, объединять или проверять последовательность текстовых файлов (sort, merge, or sequence check text files)
Имя (Name)
sort — sort, merge, or sequence check text files
Синопсис (Synopsis)
sort [
-m] [
-o output] [
-bdfinru] [
-t char] [
-k keydef]
... [
file...]
sort [
-c|-C] [
-bdfinru] [
-t char] [
-k keydef] [
file]
Описание (Description)
The sort utility shall perform one of the following functions:
1. Sort lines of all the named files together and write the
result to the specified output.
2. Merge lines of all the named (presorted) files together and
write the result to the specified output.
3. Check that a single input file is correctly presorted.
Comparisons shall be based on one or more sort keys extracted
from each line of input (or, if no sort keys are specified, the
entire line up to, but not including, the terminating <newline>),
and shall be performed using the collating sequence of the
current locale. If this collating sequence does not have a total
ordering of all characters (see the Base Definitions volume of
POSIX.1‐2017, Section 7.3.2, LC_COLLATE), any lines of input that
collate equally should be further compared byte-by-byte using the
collating sequence for the POSIX locale.