Expand Your Command Line

Tutorials – moreutils

Article from Issue 204/2017
Author(s):

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.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Hot Stuff!

    This month, sys admin columnist Charly dumps the moreutils toolbox on his workbench and takes combine and vidir for a spin.

  • Command Line: Mailx

    The simple mailx command-line mail client handles mail either interactively or via command-line options. Although it lacks the convenience of a GUI-based tool, mailx compares well in scripting.

  • Command Line: Diffutils

    The Diffutils tool set helps you compare text files, discover and display the differences between files, and even automatically synchronize files.

  • Tutorials – Systemd

    Take control of the services running on your Linux machine

  • Command Line: File Management

    Do some serious spring cleaning and reorganize your data. The right commands can help you to keep on top of your file and directory management.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News