Forrest logo
back to context overview

sort

List of commands for sort:

  • sort:tldr:0678f sort: Sort a file preserving only unique lines.
    $ sort --unique ${filename}
    try on your machine
    explain this command
  • sort:tldr:58874 sort: Sort a file using numeric rather than alphabetic order.
    $ sort --numeric-sort ${filename}
    try on your machine
    explain this command
  • sort:tldr:61ea9 sort: Sort a file in ascending order.
    $ sort ${filename}
    try on your machine
    explain this command
  • sort:tldr:7dc78 sort: Sort a file, printing the output to the specified output file (can be used to sort a file in-place).
    $ sort --output=${filename} ${filename}
    try on your machine
    explain this command
  • sort:tldr:c260b sort: Sort a file in descending order.
    $ sort --reverse ${filename}
    try on your machine
    explain this command
  • sort:tldr:da83e sort: Sort `/etc/passwd` by the 3rd field of each line numerically, using ":" as a field separator.
    $ sort --field-separator=${:} --key=${3n} ${-etc-passwd}
    try on your machine
    explain this command
  • sort:tldr:df82b sort: Sort a file in case-insensitive way.
    $ sort --ignore-case ${filename}
    try on your machine
    explain this command
  • sort:tldr:e25cf sort: Sort numbers with exponents.
    $ sort --general-numeric-sort ${filename}
    try on your machine
    explain this command
back to context overview