.TH LLTSV "1" "September 2020" "lltsv" "User Commands" .SH NAME lltsv \- List specified keys of LTSV (Labeled Tab Separated Values) .SH SYNOPSIS .TP lltsv [global options] command [command options] [arguments...] .PP lltsv [\fB\-\-key\fR value] [\fB\-k\fR value] [\fB\-\-no\-key\fR] [\fB\-K\fR] [\fB\-\-ignore\-key\fR value] [\fB\-i\fR value] [\fB\-\-filter\fR value] [\fB\-f\fR value] [\fB\-\-expr\fR value] [\fB\-e\fR value] [\fB\-\-help\fR] [\fB\-h\fR] [\fB\-\-version\fR] [\fB\-v\fR] .SH DESCRIPTION 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) .SH OPTIONS .TP \fB\-\-key\fR value keys to output (multiple keys separated by ,) .PP .TP \fB\-\-no\-key\fR, \fB\-K\fR output without keys (and without color) .PP .TP \fB\-\-ignore\-key\fR value, \fB\-i\fR value ignored keys to output (multiple keys separated by ,) .PP .TP \fB\-\-filter\fR value, \fB\-f\fR value filter expression to output .PP .TP \fB\-\-expr\fR value, \fB\-e\fR value evaluate value by expression to output .PP .TP \fB\-\-help\fR, \fB\-h\fR show help .PP .TP \fB\-\-version\fR, \fB\-v\fR print the version .PP .SH EXAMPLES .TP Example1: .RS $ echo "foo:aaa\etbar:bbb" | lltsv \fB\-k\fR foo,bar .TP foo:aaa bar:bbb .PP The output is colorized as default when you outputs to a terminal. The coloring is disabled if you pipe or redirect outputs. .RE .TP Example2: .RS $ echo "foo:aaa\etbar:bbb" | lltsv \fB\-k\fR foo,bar \fB\-K\fR .TP aaa bbb .PP Eliminate labels with "\-K" option. .RE .TP Example3: .RS $ lltsv \fB\-k\fR foo,bar \fB\-K\fR file*.log .PP Specify input files as arguments. .RE .TP Example4: .RS $ lltsv \fB\-k\fR resptime,status,uri \fB\-f\fR 'resptime > 6' access_log .PP .TP \f(CW$ lltsv -k resptime,status,uri -f 'resptime > 6' -f 'uri =~ ^/foo' access_log\fR .PP Filter output with "\-f" option. Available comparing operators are: .IP \(bu >= > == < <= (arithmetic (float64)) .PP .IP \(bu == ==* != !=* (string comparison (string)) .PP .IP \(bu =~ !~ =~* !~* (regular expression (string)) .PP The comparing operators terminated by * behave in case\-insensitive. You can specify multiple \fB\-f\fR options (AND condition). .RE .TP Example5 .RS $ lltsv \fB\-k\fR resptime,upstream_resptime,diff \fB\-f\fR 'diff = resptime \- upstream_resptime' access_log .PP .TP \f(CW$ lltsv -k resptime,upstream_resptime,diff_ms -e 'diff_ms = (resptime - upstream_resptime) * 1000' access_log\fR .PP Evaluate value with "\-e" option. Available operators are: + \- * / (arithmetic (float64)) .RE .SH AUTHOR sonots .PP .SH SEE ALSO https://github.com/sonots/lltsv .PP