Skip to content

Commit 9852a7b

Browse files
committed
add colsepin=
1 parent d56134e commit 9852a7b

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

man/man1/tabcols.1

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH TABCOLS 1NEMO "20 November 2022"
1+
.TH TABCOLS 1NEMO "10 September 2024"
22

33
.SH "NAME"
44
tabcols \- Select columns, and optionally rearrange, from a table
@@ -7,13 +7,13 @@ tabcols \- Select columns, and optionally rearrange, from a table
77
\fPtabcols\fP [parameter=value] ...
88

99
.SH "DESCRIPTION"
10-
\fBtabcols\fP selects columns from a file, and can also re-arrange the
10+
\fBtabcols\fP selects columns from a file, and can thus also re-arrange the
1111
output column order. New column separators can be used on output.
1212
This way a newline on input can be converted into a space on
1313
output and therefore creating a file with one long column from
14-
a table with mulitple columns.
14+
a table with multiple columns.
1515
.PP
16-
To select specific lines, use \fItabrows(1NEMO)\fP or \fItabmath(1NEMO)\fP.
16+
To select specific rows/lines, use \fItabrows(1NEMO)\fP or \fItabmath(1NEMO)\fP.
1717
.PP
1818
To align a table by column, use the \fIcolumn(1)\fP program with the \fB-t\fP
1919
option.
@@ -22,28 +22,41 @@ option.
2222
.so man1/parameters
2323
.TP 20
2424
\fBin=\fP
25-
input file name(s). No default.
25+
input file name(s).
26+
.br
27+
No default.
2628
.TP
2729
\fBselect=\fP
2830
list of columns to select. Any \fInemoinp(1NEMO)\fP expression can be used.
2931
Columns can be repeated, and in any order. The output will be in exactly
3032
the same order as given with this keyword. First column is 1. Column 0 can also
3133
be added to the output, which is the row number (first row is 1).
34+
.br
3235
[all]
3336
.TP
3437
\fBcolsep=\fP
3538
Column separator. Valid are: \fBs\fP (space), \fBn\fP (newline),
3639
\fBt\fP (tab),
3740
\fBr\fP (carriage return), as well as the literal symbols '\fB,\fP'
3841
and '\fB:\fP'.
42+
.br
3943
[Default: \fBs\fP]
44+
45+
.TP
46+
\fBcolsepin=\fP
47+
Column separator for input. By default an internal set (space, comma, tab, vertical bar)
48+
is used. A string can be specified here consistent of multiple characters.
49+
50+
4051
.TP
4152
\fBout=-\fP
4253
output file name. By default standard output it used.
54+
.br
55+
[-]
4356

4457
.SH "CAVEATS"
4558
Although this program uses the new table interface, there are
46-
still some internal variables that limits the column count.
59+
still some internal variables that limit the column count.
4760

4861
.SH "EXAMPLE"
4962
Here is an example of how to reverse the columns from a table with 4 columns:
@@ -55,9 +68,13 @@ re-arranges all the numbers in a table in one long column
5568
.nf
5669
tabcols in.tab all n > out.tab
5770
.fi
71+
or in one long row:
72+
.nf
73+
tabcols in.tab all n | tabtranspose - - > out.tab
74+
.fi
5875

5976
.SH "SEE ALSO"
60-
tabrows(1NEMO), tabmath(1NEMO), tabs(1NEMO), tabtab(1NEMO), awk(1), column(1)
77+
tabrows(1NEMO), tabtranspos(1NEMO), tabmath(1NEMO), tabs(1NEMO), tabtab(1NEMO), awk(1), column(1)
6178

6279
.SH "FILES"
6380
src/kernel/tab/tabcols.c source code
@@ -71,4 +88,5 @@ Peter Teuben
7188
26-Jan-00 V1.0 Created PJT
7289
9-apr-09 V2.0 out=- now default and last argument PJT
7390
5-may-2022 V2.1 converted to table V2 interface PJT
91+
10-sep-2024 V2.4 added colsepin= PJT
7492
.fi

0 commit comments

Comments
 (0)