]>
Commit | Line | Data |
---|---|---|
6dbe3af9 KZ |
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 | .\" | |
232dc924 | 34 | .TH COLUMN 1 "October 2010" "util-linux" "User Commands" |
6cebde5c SK |
35 | .SH NAME |
36 | column - columnate lists | |
37 | .SH SYNOPSIS | |
38 | .B column | |
39 | .RI [ options ] | |
40 | .IR file ... | |
41 | .SH DESCRIPTION | |
232dc924 BS |
42 | The |
43 | .B column | |
44 | utility formats its input into multiple columns. Rows | |
45 | are filled before columns. Input is taken from \fIfile\fR or, by | |
46 | default, from standard input. Empty lines are ignored. | |
6cebde5c SK |
47 | .PP |
48 | .SH OPTIONS | |
49 | .IP "\fB\-c, \-\-columns\fP \fIwidth\fP" | |
001a4424 | 50 | Output is formatted to a width specified as number of characters. |
6cebde5c | 51 | .IP "\fB\-t, \-\-table\fP" |
6dbe3af9 KZ |
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 | |
6cebde5c | 54 | supplied using the separator. Table output is useful for pretty-printing. |
a38dc987 PB |
55 | .IP "\fB\-s, \-\-separator\fP \fIseparators\fP" |
56 | Specify possible table delimiters (default is whitespace). | |
47bd8ddc SK |
57 | .IP "\fB\-o, \-\-output-separator\fP \fIseparators\fP" |
58 | Specify table output delimiter (default is two whitespaces). | |
6cebde5c | 59 | .IP "\fB\-x, \-\-fillrows\fP" |
6dbe3af9 | 60 | Fill columns before filling rows. |
6cebde5c SK |
61 | .IP "\fB\-h, \-\-help\fP" |
62 | Print help and exit. | |
63 | .SH ENVIRONMENT | |
64 | The environment variable COLUMNS is used to determine the size of | |
6dbe3af9 | 65 | the screen if no other information is available. |
6cebde5c SK |
66 | .SH EXAMPLES |
67 | .nf | |
68 | sed 's/#.*//' /etc/fstab | column -t | |
69 | .nf | |
018dfb0f SK |
70 | .SH BUGS |
71 | The util-linux version 2.23 changed | |
72 | .B \-s | |
73 | option to be non-greedy, for example: | |
74 | .PP | |
75 | .EX | |
3295cde4 | 76 | $ printf "a:b:c\\n1::3\\n" | column -t -s ':' |
018dfb0f SK |
77 | .EE |
78 | .PP | |
79 | old output: | |
80 | .EX | |
81 | a b c | |
82 | 1 3 | |
83 | .EE | |
84 | .PP | |
85 | new output (since util-linux 2.23) | |
86 | .EX | |
87 | a b c | |
88 | 1 3 | |
89 | .EE | |
6cebde5c SK |
90 | .SH "SEE ALSO" |
91 | .BR colrm (1), | |
92 | .BR ls (1), | |
93 | .BR paste (1), | |
94 | .BR sort (1) | |
95 | .SH HISTORY | |
96 | The column command appeared in 4.3BSD-Reno. | |
97 | .SH AVAILABILITY | |
601d12fb KZ |
98 | The column command is part of the util-linux package and is available from |
99 | ftp://ftp.kernel.org/pub/linux/utils/util-linux/. |