carta
vnl-uniq(1)

vnl-uniq1

Uniq a log file, preserving the legend

Usage

blue

yellow

yellow

blue

yellow

orange

orange

2 blue

2 orange

3 yellow

Overview

  Usage: vnl-uniq [options] < logfile

This tool runs "uniq" on a given vnlog dataset. "vnl-uniq" is a wrapper around the GNU coreutils "uniq" tool. Since this is a wrapper, most commandline options and behaviors of the "uniq" tool are present; consult the uniq(1) manpage for detail. The differences from GNU coreutils "uniq" are

•

The input and output to this tool are vnlog files, complete with a legend

•

"--zero-terminated" is not supported because vnlog assumes newline-separated records

•

Only one input is supported (a file on the cmdline or data on standard input), and the output always goes to standard output. Specifying the output as a file on the commandline is not supported.

•

"--vnl-count NAME" can be given to name the "count" column. "-c" is still supported to add the default new column named "count", but if another name is wanted, "--vnl-count" does that. "--vnl-count" implies "-c"

•

In addition to the normal behavior of skipping fields at the start, "-f" and "--skip-fields" can take a negative argument to skip the all but the last N fields. For instance, to use only the one last field, pass "-f -1" or "--skip-fields=-1".

•

By default we call the "uniq" tool to do the actual work. If the underlying tool has a different name or lives in an odd path, this can be specified by passing "--vnl-tool TOOL"

Past that, everything "uniq" does is supported, so see that man page for detailed documentation.

Compatibility

I use GNU/Linux-based systems exclusively, but everything has been tested functional on FreeBSD and OSX in addition to Debian, Ubuntu and CentOS. I can imagine there's something I missed when testing on non-Linux systems, so please let me know if you find any issues.

Repository

https://github.com/dkogan/vnlog/

History

  • Debian 13 (Trixie): the text shown here
  • Debian 12 (Bookworm)
  • Debian 11 (Bullseye)

Author

Dima Kogan "<[email protected]>"

From vnlog 1.40-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.