.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "VNL-UNIQ 1" .TH VNL-UNIQ 1 2024-02-04 "" vnlog .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME vnl\-uniq \- uniq a log file, preserving the legend .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 9 \& $ cat colors.vnl \& # color \& blue \& yellow \& yellow \& blue \& yellow \& orange \& orange \& \& $ < colors.vnl | vnl\-sort | vnl\-uniq \-c \& # count color \& 2 blue \& 2 orange \& 3 yellow .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" .Vb 1 \& Usage: vnl\-uniq [options] < logfile .Ve .PP This tool runs \f(CW\*(C`uniq\*(C'\fR on a given vnlog dataset. \f(CW\*(C`vnl\-uniq\*(C'\fR is a wrapper around the GNU coreutils \f(CW\*(C`uniq\*(C'\fR tool. Since this is a wrapper, most commandline options and behaviors of the \f(CW\*(C`uniq\*(C'\fR tool are present; consult the \fBuniq\fR\|(1) manpage for detail. The differences from GNU coreutils \f(CW\*(C`uniq\*(C'\fR are .IP \(bu 4 The input and output to this tool are vnlog files, complete with a legend .IP \(bu 4 \&\f(CW\*(C`\-\-zero\-terminated\*(C'\fR is not supported because vnlog assumes newline-separated records .IP \(bu 4 Only \fIone\fR input is supported (a file on the cmdline or data on standard input), and the output \fIalways\fR goes to standard output. Specifying the output as a file on the commandline is not supported. .IP \(bu 4 \&\f(CW\*(C`\-\-vnl\-count NAME\*(C'\fR can be given to name the \f(CW\*(C`count\*(C'\fR column. \f(CW\*(C`\-c\*(C'\fR is still supported to add the default new column named \f(CW\*(C`count\*(C'\fR, but if another name is wanted, \f(CW\*(C`\-\-vnl\-count\*(C'\fR does that. \f(CW\*(C`\-\-vnl\-count\*(C'\fR implies \f(CW\*(C`\-c\*(C'\fR .IP \(bu 4 In addition to the normal behavior of skipping fields at the start, \f(CW\*(C`\-f\*(C'\fR and \&\f(CW\*(C`\-\-skip\-fields\*(C'\fR can take a negative argument to skip the \fIall but the last\fR N fields. For instance, to use only the one last field, pass \f(CW\*(C`\-f \-1\*(C'\fR or \&\f(CW\*(C`\-\-skip\-fields=\-1\*(C'\fR. .IP \(bu 4 By default we call the \f(CW\*(C`uniq\*(C'\fR 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 \f(CW\*(C`\-\-vnl\-tool TOOL\*(C'\fR .PP Past that, everything \f(CW\*(C`uniq\*(C'\fR does is supported, so see that man page for detailed documentation. .SH COMPATIBILITY .IX Header "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. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBuniq\fR\|(1) .SH REPOSITORY .IX Header "REPOSITORY" https://github.com/dkogan/vnlog/ .SH AUTHOR .IX Header "AUTHOR" Dima Kogan \f(CW\*(C`\*(C'\fR .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright 2019 Dima Kogan \f(CW\*(C`\*(C'\fR .PP This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.