Expand Your Command Line
Tutorials – moreutils
Upgrade your Bash sessions with extra features and power.
Way back in the distant past (the 1970s), a group of programmers at Bell Labs created the first version of Unix. This operating system came with a set of utilities to help use the shell-driven interface. Those utilities proved incredibly useful, and we still have them today. Things like ls
, rm
, and cat
are all descendants of the first pieces of Unix software, and they've changed remarkably little over the years. The GNU versions found on most Linux systems have more features than their ancestors, but the basic functionality remains the same.
These utilities have remained fairly static, because they stick to the basic Unix philosophy of "do one thing well." When you do one thing, there's far less to change or optimize. For this to work well, though, you need enough different tools that each does one thing well. While there's new Linux software being created all the time, there's surprisingly little of the sort of utility software that makes it easy to build powerful commands. In this tutorial, I'm going to look at the work of one project looking to change that: moreutils. Essentially, this project is just looking to expand the basic set of utilities. You should find it in your package manager (probably in a package called moreutils), or you can download it directly from the project website [1].
The aim of each of the utilities is to do just one thing well, so none of them are particularly complicated to use, and each utility has a well-written man page for guidance (Figure 1). The first of the commands I'll look at is combine
, which takes two sets of input and combines them using a single logic rule to form the output.
[...]
Buy this article as PDF
(incl. VAT)