]> git.ipfire.org Git - thirdparty/util-linux.git/blob - text-utils/column.1
Merge branch 'pg-manual-page-long-options' of https://github.com/jaalto/util-linux
[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 "October 2010" "util-linux" "User Commands"
35 .SH NAME
36 column - columnate lists
37 .SH SYNOPSIS
38 .B column
39 .RB [ options ]
40 .RI [ file ...]
41 .SH DESCRIPTION
42 The
43 .B column
44 utility formats its input into multiple columns. By default, rows
45 are filled before columns. Input is taken from \fIfile\fR, or
46 otherwise from standard input. Empty lines are ignored.
47 .PP
48 .SH OPTIONS
49 .IP "\fB\-c, \-\-columns\fP \fIwidth\fP"
50 Output is formatted to a width specified as number of characters.
51 .IP "\fB\-t, \-\-table\fP"
52 Determine the number of columns the input contains and create a table.
53 Columns are delimited with whitespace, by default, or with the characters
54 supplied using the \fB\-\-output-separator\fP option.
55 Table output is useful for pretty-printing.
56 .IP "\fB\-s, \-\-separator\fP \fIseparators\fP"
57 Specify the possible input item delimiters (default is whitespace).
58 .IP "\fB\-o, \-\-output-separator\fP \fIstring\fP"
59 Specify the columns delimiter for table output (default is two spaces).
60 .IP "\fB\-x, \-\-fillrows\fP"
61 Fill columns before filling rows.
62 .IP "\fB\-h, \-\-help\fP"
63 Display help text and exit.
64 .SH ENVIRONMENT
65 The environment variable COLUMNS is used to determine the size of
66 the screen if no other information is available.
67 .SH EXAMPLES
68 .nf
69 sed 's/#.*//' /etc/fstab | column -t
70 .nf
71 .SH BUGS
72 The util-linux version 2.23 changed
73 .B \-s
74 option to be non-greedy, for example:
75 .PP
76 .EX
77 $ printf "a:b:c\\n1::3\\n" | column -t -s ':'
78 .EE
79 .PP
80 old output:
81 .EX
82 a b c
83 1 3
84 .EE
85 .PP
86 new output (since util-linux 2.23)
87 .EX
88 a b c
89 1 3
90 .EE
91 .SH "SEE ALSO"
92 .BR colrm (1),
93 .BR ls (1),
94 .BR paste (1),
95 .BR sort (1)
96 .SH HISTORY
97 The column command appeared in 4.3BSD-Reno.
98 .SH AVAILABILITY
99 The column command is part of the util-linux package and is available from
100 ftp://ftp.kernel.org/pub/linux/utils/util-linux/.