suckless unix tools
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.0 KiB

.Dd 2015-10-08
.Dt COLS 1
.Os sbase
.Nm cols
.Nd columnize output
.Op Fl c Ar num
.Op Ar file ...
reads each
.Ar file
in sequence and writes them to stdout, in as many vertical
columns as will fit in
.Ar num
character columns.
If no
.Ar file
is given,
reads from stdin.
By default
.Nm cols
tries to figure out the width of the output device.
If that fails, it defaults to 65 chars.
.Bl -tag -width Ds
.It Fl c Ar num
Set maximum number of character columns to
.Ar num ,
unless input lines exceed this limit.
.Bl -tag -width Ds
The width of the output device.
is similar to
.Xr mc 1
in Plan 9. It was renamed to
to avoid the name collision with the popular file manager
Midnight Commander.
This implementation of
assumes that each UTF-8 code point occupies one character cell,
and thus mishandles TAB characters (among others).
currently mangles files which contain embedded NULs.