Miguel Rentes tours moreutils, a collection of small programs that fill gaps between standard Unix commands. The strongest examples handle the operational details that shell scripts often leave implicit: when output matters, when a file can be overwritten, and whose failure reaches the caller.
- Keep failure output:
chronichides a command’s output when it succeeds and shows it when it fails. Scheduled jobs can stay verbose without sending routine success noise. - Delay the write:
spongereads all input before opening the destination for writing. A pipeline can read and rewrite the same file without an early redirect truncating its input. - Choose failure semantics:
mispipereturns the first command’s status. The article also points to shellpipefailwhen failures anywhere in a pipeline should count. - Make timing visible:
tstimestamps each input line, helping reveal pauses in a script or changes during a connectivity test. - Compose around the gaps:
ifneruns a command only when input exists;vipelets a person edit data halfway through a pipeline.
Small scripts deserve explicit decisions about failure, buffering, and observability. A narrow command can make those decisions easier to read than another layer of shell glue.
This is a 2015 reference. Treat its installation flags as historical, and consult current man pages before copying commands. Buffering with sponge addresses early truncation; a successful transformation still needs its own validation.