Back to Blog
Arnošt Havelka

SORT - Order Data

Sort lines of text files.

Start Interactive Lesson
SORT - Order Data

Sorting Data

The sort command allows you to arrange lines of text in a specific order.

Basic Sorting

By default, sort orders lines alphabetically.

Usage:sort-r
sort
Sort alphabetically
-r
Reverse sort order

References

These Microsoft Learn and Windows documentation links provide authoritative details for the commands used in this article.

Up Next

SORT - Unique Lines

Sort and remove duplicates.