$ cat sizes-colors.vnl
# size color
12 blue
11 yellow
13 yellow
53 blue
34 yellow
22 orange
11 orange
$ < sizes-colors.vnl | vnl-filter -p color | vnl-sort -k color | vnl-uniq -c
# count color
2 blue
2 orange
3 yellow
$ < sizes-colors.vnl | vnl-sort -k color | vnl-uniq --group -f -1
# size color
12 blue
53 blue
11 orange
22 orange
11 yellow
13 yellow
34 yellow
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
Past that, everything "uniq" does is supported, so see that man page for detailed documentation.
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.
https://github.com/dkogan/vnlog/
Dima Kogan "<dima@secretsauce.net>"
Copyright 2019 Dima Kogan "<dima@secretsauce.net>"
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.