Search

2.17. shell:sort, sort

download PDF

Abstract

writes a sorted concatenation of the specified files to standard output

Synopsis

shell:sort [ --help ] [[ -t ] | [ --field-separator ] sep] [[ -b ] | [ --ignore-leading-blanks ]] [[ -f ] | [ --ignore-case ]] [[ -r ] | [ --reverse ]] [[ -k ] | [ --key ] keys] [[ -n ] | [ --numeric-sort ]] [[ -u ] | [ --unique ]] { file ...}

Arguments

Table 2.17, “shell:sort Arguments” describes the command's arguments.
Table 2.17. shell:sort Arguments
ArgumentInterpretation
--help Displays the online help for this command
-t, --field-separator Specifies a character to use as a field separator. The default is whitespace.
-b, --igonore-leading-blanks Igonores leading blanks.
-f, --ignore-case Ignores case when sorting.
-r, --reverse Reverses the result of the sort.
-k, --key Specifies a space delimited list of fields to use for sorting.
-n, --numeric-set Compares according to string numerical value.
-u, --unique Outputs only the first of an equal run.
files Specifies a space delimited list of files to sort.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.