summaryrefslogtreecommitdiffstats
path: root/text-utils/column.1
diff options
context:
space:
mode:
authorKarel Zak2017-05-05 11:47:46 +0200
committerKarel Zak2017-05-05 11:47:46 +0200
commit435846ef99f57140791cacc8527cb8c8418aa5d3 (patch)
treec6d9400e99ef424e7f9070a7886a0659421ee694 /text-utils/column.1
parentcolumn: fix --tree id-parent loop crash (diff)
downloadkernel-qcow2-util-linux-435846ef99f57140791cacc8527cb8c8418aa5d3.tar.gz
kernel-qcow2-util-linux-435846ef99f57140791cacc8527cb8c8418aa5d3.tar.xz
kernel-qcow2-util-linux-435846ef99f57140791cacc8527cb8c8418aa5d3.zip
column: add --tree to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'text-utils/column.1')
-rw-r--r--text-utils/column.123
1 files changed, 20 insertions, 3 deletions
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