mirror of
https://codeberg.org/scip/tablizer.git
synced 2025-12-16 20:20:57 +01:00
added support for regexp in -c parameter, added deduplication as well
This commit is contained in:
31
tablizer.pod
31
tablizer.pod
@@ -67,7 +67,7 @@ have a numer associated with it, e.g.:
|
||||
NAME(1) READY(2) STATUS(3) RESTARTS(4) AGE(5)
|
||||
|
||||
These numbers denote the column and you can use them to specify which
|
||||
columns you want to have in your output:
|
||||
columns you want to have in your output (see L<COLUMNS>:
|
||||
|
||||
kubectl get pods | tablizer -c1,3
|
||||
|
||||
@@ -114,6 +114,35 @@ Example for a case insensitive search:
|
||||
kubectl get pods -A | tablizer "(?i)account"
|
||||
|
||||
|
||||
=head2 COLUMNS
|
||||
|
||||
The parameter B<-c> can be used to specify, which columns to
|
||||
display. By default tablizer numerizes the header names and these
|
||||
numbers can be used to specify which header to display, see example
|
||||
above.
|
||||
|
||||
However, beside numbers, you can also use regular expressions with
|
||||
B<-c>, also separated by comma. And you can mix column numbers with
|
||||
regexps.
|
||||
|
||||
Lets take this table:
|
||||
|
||||
PID TTY TIME CMD
|
||||
14001 pts/0 00:00:00 bash
|
||||
42871 pts/0 00:00:00 ps
|
||||
42872 pts/0 00:00:00 sed
|
||||
|
||||
We want to see only the CMD column and use a regex for this:
|
||||
|
||||
ps | tablizer -s '\s+' -c C
|
||||
CMD(4)
|
||||
bash
|
||||
ps
|
||||
tablizer
|
||||
sed
|
||||
|
||||
where "C" is our regexp which matches CMD.
|
||||
|
||||
=head2 OUTPUT MODES
|
||||
|
||||
There might be cases when the tabular output of a program is way too
|
||||
|
||||
Reference in New Issue
Block a user