From 435846ef99f57140791cacc8527cb8c8418aa5d3 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 5 May 2017 11:47:46 +0200 Subject: column: add --tree to the man page Signed-off-by: Karel Zak --- text-utils/column.1 | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'text-utils') diff --git a/text-utils/column.1 b/text-utils/column.1 index 97cdd67c0..0c4f8794e 100644 --- a/text-utils/column.1 +++ b/text-utils/column.1 @@ -100,6 +100,12 @@ Don't print specified columns. Specify columns order on output. .IP "\fB\-n, \-\-table-name\fP \fIname\fP" Specify the table name used for JSON output. The defaout is "table". +.IP "\fB\-r, \-\-tree\fP \fIcolumn\fP" +Specify column to use tree-like output. +.IP "\fB\-i, \-\-tree\-id\fP \fIcolumn\fP" +Specify column with line ID to create child-parent relation. +.IP "\fB\-p, \-\-tree\-parent\fP \fIcolumn\fP" +Specify column with parent ID to create child-parent relation. .PP .IP "\fB\-x, \-\-fillrows\fP" Fill rows before filling columns. @@ -111,9 +117,20 @@ Display help text and exit. The environment variable \fBCOLUMNS\fR is used to determine the size of the screen if no other information is available. .SH EXAMPLES -.nf -.B sed 's/#.*//' /etc/fstab | column --table --table-columns SOURCE,TARGET,TYPE,OPTIONS,PASS,FREQ --table-right PASS,FREQ -.nf +Print fstab with header line and align number to the right: +.EX +\fBsed 's/#.*//' /etc/fstab | column --table --table-columns SOURCE,TARGET,TYPE,OPTIONS,PASS,FREQ --table-right PASS,FREQ\fR +.EE +.PP +Print a tree: +.EX +\fBecho -e '1 0 A\\n2 1 AA\\n3 1 AB\\n4 2 AAA\\n5 2 AAB' | column --tree 3 --tree-id 1 --tree-parent 2\fR +1 0 A +2 1 ├─AA +4 2 │ ├─AAA +5 2 │ └─AAB +3 1 └─AB +.EE .SH BUGS Version 2.23 changed the .B \-s -- cgit v1.2.3-55-g7522