The moreutils collection
Charly's Column – moreutils
This month, sys admin columnist Charly dumps the moreutils toolbox on his workbench and takes combine and vidir for a spin.
In the March 2013 issue, I wrote about ifdata, which gives you information about networks in a way that is great for scripting. I had taken the tool from the moreutils package at the time; this toolbox comes with almost every flavor of Linux, and, if not, you can download it [1]. Further investigation of the package reveals even more laser-sharp tools. For instance, combine is really practical for comparing stuff. You need to pass in the names of two text files and a logical operator: and, not, or, or xor (exclusive or).
As an example, I created two text files with IP addresses and networks. Some of the addresses and networks are included in both files, while others are not. Now I let combine compare the files, first with the and operator:
combine iplist-a.text and iplist-b.text
[...]
Buy this article as PDF
(incl. VAT)
