Remove commented out man sections [c9c3eaf8ab]
[tabular.git] / tabular.1
blob2dc33ac2b9d172e0e01a882bfcdf861136e3db2b
1 .\" SPDX-License-Identifier: BSD-2-Clause
3 .\" Copyright (c) 2021 Alessio Chiapperini.
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 .\" POSSIBILITY OF SUCH DAMAGE.
27 .Dd October 9, 2021
28 .Dt TABULAR 1
29 .Os
30 .Sh NAME
31 .Nm tabular
32 .Nd pretty prints tabular data
33 .Sh SYNOPSIS
34 .Nm
35 .Op Fl s Ar sep
36 .Op Ar
37 .Sh DESCRIPTION
38 The
39 .Nm
40 utility reads files containing tabular data sequentially and pretty prints them as a table.
41 The
42 .Ar file
43 operands are processed in command-line order. If the
44 .Ar file
45 is a single dash
46 .Pq Sq Fl ,
47 or absent,
48 .Nm
49 reads from standard input. The separator character of each column in the dataset can be specified at
50 run-time, which defaults to the comma character.
51 .Pp
52 The options are as follows:
53 .Bl -tag -width indent
54 .It Fl s Ar sep
55 Use
56 .Ar sep
57 as the field delimiter character instead of the comma character.
58 .El
59 .Sh "EXIT STATUS"
60 The
61 .Nm
62 utility exits 0 on success, and 1 if an error occurs.
63 .Sh EXAMPLES
64 Pretty print the text received from stdin where each field is separated by the comma character:
65 .Dl "tabular"
66 .Pp
67 Pretty print file passed as parameter:
68 .Pp
69 .Dl "tabular addresses.csv"
70 .Pp
71 Pretty print files passed as parameters where the content of the second file is taken from stdin:
72 .Pp
73 .Dl "tabular tally_cab.csv - addresses.csv"
74 .Pp
75 Pipe the out of cat to tabular where the field separator is set to the semicolon character:
76 .Dl "cat names.csv | tabular -s ';'"
77 .Sh SEE ALSO
78 .Xr column 1
79 .Sh BUGS
80 .Bl -tag -width indent
81 .It Input lines are limited to LINE_MAX bytes in length.
82 .It Only single character separators are allowed.
83 .It The program presumes the locale is UTF-8.
84 .El
85 .Sh AUTHOR
86 .An Alessio Chiapperini Aq Mt alessio.chiapperini@\:nullbuffer.com