Difference between revisions of "Moreutils"
From WA2IAC Wiki
(Linux - moreutils package) |
(→moreutils package) |
||
Line 1: | Line 1: | ||
− | moreutils | + | =moreutils package= |
− | What's included | + | moreutils is "a growing collection of the unix tools that nobody thought to write long ago when unix was young". |
+ | |||
+ | I discovered this while looking for a solution to timestamp logfiles that programmers of a proprietary organization had seen fit not to timestamp. I didn't want the overhead of repeatedly calling 'date' that a quick-and-dirty shell script would have required. | ||
+ | |||
+ | Note that for logging, the "unbuffer" command (included in most modern distros) may need to be used to get the desired behavior (e.g. when tailing files). | ||
+ | |||
+ | But wait... there's still a LOT more! | ||
+ | |||
+ | ==What's included== | ||
Probably the most general purpose tool in moreutils so far is sponge(1), which lets you do things like this: | Probably the most general purpose tool in moreutils so far is sponge(1), which lets you do things like this: | ||
Line 11: | Line 19: | ||
There are lots more listed below, and I'm always interested to add more to the collection, as long as they're suitably general-purpose, and don't duplicate other well-known tools. | There are lots more listed below, and I'm always interested to add more to the collection, as long as they're suitably general-purpose, and don't duplicate other well-known tools. | ||
− | + | *chronic: runs a command quietly unless it fails | |
− | + | *combine: combine the lines in two files using boolean operations | |
− | + | *ifdata: get network interface info without parsing ifconfig output | |
− | + | *ifne: run a program if the standard input is not empty | |
− | + | *isutf8: check if a file or standard input is utf-8 | |
− | + | *lckdo: execute a program with a lock held | |
− | + | *mispipe: pipe two commands, returning the exit status of the first | |
− | + | *parallel: run multiple jobs at once | |
− | + | *pee: tee standard input to pipes | |
− | + | *sponge: soak up standard input and write to a file | |
− | + | *ts: timestamp standard input | |
− | + | *vidir: edit a directory in your text editor | |
− | + | *vipe: insert a text editor into a pipe | |
− | + | *zrun: automatically uncompress arguments to command | |
− | Download | + | ==Download== |
A Debian package as well as the source tarball for moreutils can be downloaded from packages.debian.org, or using apt. It's also in Ubuntu, and, I hear in several other Linux distributions. | A Debian package as well as the source tarball for moreutils can be downloaded from packages.debian.org, or using apt. It's also in Ubuntu, and, I hear in several other Linux distributions. |