The command sort is useful to order text lines. Sort orders alphabetically by default but there are options that enable you to order in other ways like in reverse alphabetical order or by string numerical value.
In this example I’ll demonstrate how to order a text file in place, that is, take a file and order all its lines alphabetically without making a copy first.
I got a file named namelist.txt which contains an unordered list of names.
This file can be easily ordered in place with the following shell command.
sort -o namelist.txt namelist.txt
In April 2021 I decided to start using Arch Linux as a Desktop OS after testing it throughout 2020. I moved from Debian to Fedora at the start of 2021 and liked the experience but failed to grasp how to complete a Fedora minimal install and customize it with i3wm. Instead, I installed the default Fedora Workstation with Gnome as a DE and installed i3wm as an alternative. This worked great and I enjoyed it, however, I have decided to move to Arch as I find it is a superior learning experience than customizing Fedora Workstation.
Managing an Arch Linux…
The Man Pages for GCC compiler are not included by default on Debian 10 Buster and must be added by installing the Backport package named gcc-doc. To complete this task, I recommend you should add the Backports sources with options main contrib to your source files /etc/apt/sources.list.d/ directory on a file named buster-backports.list. You can do this with this command:
echo deb http://deb.debian.org/debian buster-backports main contrib | sudo tee /etc/apt/sources.list.d/buster-backports.list
After this, run:
sudo apt update
sudo apt install gcc gcc-doc
Now try running this to corroborate proper installation of GCC’s man pages.
Note: You could also add the non-free option to your Backports source if you are interested in other unrelated non-free software later on, but it is not required for installing gcc-doc.
Originally published at https://blog.victoroalvarez.com.