DOKK / manpages / debian 12 / lltsv / lltsv.1.en
LLTSV(1) User Commands LLTSV(1)

lltsv - List specified keys of LTSV (Labeled Tab Separated Values)

lltsv [--key value] [-k value] [--no-key] [-K] [--ignore-key value] [-i value] [--filter value] [-f value] [--expr value] [-e value] [--help] [-h] [--version] [-v]

lltsv is a command line tool to list specified keys of LTSV (Labeled Tab Separated Values) text with colorized output to a terminal. It supports to filter with some comparing operators (arithmetic expression or regular expression)

keys to output (multiple keys separated by ,)
output without keys (and without color)
ignored keys to output (multiple keys separated by ,)
filter expression to output
evaluate value by expression to output
show help
print the version

$ echo "foo:aaa\tbar:bbb" | lltsv -k foo,bar

The output is colorized as default when you outputs to a terminal. The coloring is disabled if you pipe or redirect outputs.

$ echo "foo:aaa\tbar:bbb" | lltsv -k foo,bar -K

Eliminate labels with "-K" option.

$ lltsv -k foo,bar -K file*.log

Specify input files as arguments.

$ lltsv -k resptime,status,uri -f 'resptime > 6' access_log
$ lltsv -k resptime,status,uri -f 'resptime > 6' -f 'uri =~ ^/foo' access_log

Filter output with "-f" option. Available comparing operators are:

  • >= > == < <= (arithmetic (float64))
  • == ==* != !=* (string comparison (string))
  • =~ !~ =~* !~* (regular expression (string))

The comparing operators terminated by * behave in case-insensitive. You can specify multiple -f options (AND condition).

$ lltsv -k resptime,upstream_resptime,diff -f 'diff = resptime - upstream_resptime' access_log
$ lltsv -k resptime,upstream_resptime,diff_ms -e 'diff_ms = (resptime - upstream_resptime) * 1000' access_log

Evaluate value with "-e" option. Available operators are: + - * / (arithmetic (float64))

sonots <sonots@gmail.com>

https://github.com/sonots/lltsv

September 2020 lltsv