The sort command sorts things. Suppose you had a file named alpha.txt that
contained the letters of the alphabet on the left margin, but scrambled.
A
J
M
B
X
W
...
Then the command:
sort alpha.txt
would produce:
A
B
C
D
E
F
...
on the screen. Sorting the file reversed by the command:
sort -r alpha.txt
would reverse the alphabetic order of the lines, giving:
Z
Y
X
W
V
U
The sort command has many options.