How to sort files in Bash.
Display contents
<pre lang="bash">
$ cat file.txt
bbb
aaa
ccc
kkk
uuu
ppp
Sort
<pre lang="bash">
$ sort file.txt
aaa
bbb
ccc
kkk
ppp
uuu
Sort in place
<pre lang="bash">
$ sort -o file.txt file.txt
$ cat file.txt
aaa
bbb
ccc
kkk
ppp
uuu