]> git.ipfire.org Git - thirdparty/util-linux.git/blob - text-utils/column.1
Merge branch 'getrandom' of git://github.com/kerolasa/lelux-utiliteetit
[thirdparty/util-linux.git] / text-utils / column.1
1 .\" Copyright (c) 1989, 1990, 1993
2 .\" The Regents of the University of California. All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\" @(#)column.1 8.1 (Berkeley) 6/6/93
33 .\"
34 .TH COLUMN 1 "July 2014" "util-linux" "User Commands"
35 .SH NAME
36 column \- columnate lists
37 .SH SYNOPSIS
38 .BR column " [options]"
39 .RI [ file ...]
40 .SH DESCRIPTION
41 The
42 .B column
43 utility formats its input into multiple columns. By default, rows
44 are filled before columns. Input is taken from \fIfile\fR, or
45 otherwise from standard input. Empty lines are ignored.
46 .PP
47 .SH OPTIONS
48 .IP "\fB\-c, \-\-columns\fP \fIwidth\fP"
49 Output is formatted to a width specified as number of characters.
50 .IP "\fB\-o, \-\-output\-separator\fP \fIstring\fP"
51 Specify the columns delimiter for table output (default is two spaces).
52 .IP "\fB\-s, \-\-separator\fP \fIseparators\fP"
53 Specify the possible input item delimiters (default is whitespace).
54 .IP "\fB\-t, \-\-table\fP"
55 Determine the number of columns the input contains and create a table.
56 Columns are delimited with whitespace, by default, or with the characters
57 supplied using the \fB\-\-output\-separator\fP option.
58 Table output is useful for pretty-printing.
59 .IP "\fB\-x, \-\-fillrows\fP"
60 Fill columns before filling rows.
61 .IP "\fB\-V\fR, \fB\-\-version\fR"
62 Display version information and exit.
63 .IP "\fB\-h, \-\-help\fP"
64 Display help text and exit.
65 .SH ENVIRONMENT
66 The environment variable \fBCOLUMNS\fR is used to determine the size of
67 the screen if no other information is available.
68 .SH EXAMPLES
69 .nf
70 .B sed 's/#.*//' /etc/fstab | column -t
71 .nf
72 .SH BUGS
73 Version 2.23 changed the
74 .B \-s
75 option to be non-greedy, for example:
76 .PP
77 .EX
78 \fBprintf "a:b:c\\n1::3\\n" | column -t -s ':'\fR
79 .EE
80 .PP
81 Old output:
82 .EX
83 a b c
84 1 3
85 .EE
86 .PP
87 New output (since util-linux 2.23):
88 .EX
89 a b c
90 1 3
91 .EE
92 .SH "SEE ALSO"
93 .BR colrm (1),
94 .BR ls (1),
95 .BR paste (1),
96 .BR sort (1)
97 .SH HISTORY
98 The column command appeared in 4.3BSD-Reno.
99 .SH AVAILABILITY
100 The column command is part of the util-linux package and is available from
101 https://www.kernel.org/pub/linux/utils/util-linux/.