The basic command line utilities in a GNU/Linux system tend to come from the GNU project:

These provide the usual set of tools expected in a tradtional Unix-like environment. These utilities, plus the usual scripting languages (shell -- bash, perl, python) are usually enough. They have certainly served the Unix command line users for decades.

Occasionally someone notices a need for a tool missing from the usual set. In 2007 Joey Hess started a project, moreutils, to collect such new tools in one place.

The moreutils collection currently contains the following programs (quoted from the home page):

  • 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

The most fun of these is sponge. It reads its standard input completely, and when it has read everything, it writes it to an output file. The output file may be an input of whatever produces the data sponge reads, but sponge won't overwrite the file until it's safe to do so.

$ cat foo.txt
$ (cat foo.txt; echo bar) | sponge foo.txt 
$ cat foo.txt

ts timestamps its input. This can be used for timestamping log output from programs that don't do that themselves.

$ ts < foo.txt
May 19 19:34:06 foo
May 19 19:34:06 bar

Have a look at the other programs in the moreutils home page. It's packaged as moreutils in Debian, and other Linux distributions.