sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

cols.1 (1026B)


      1 .Dd 2015-10-08
      2 .Dt COLS 1
      3 .Os sbase
      4 .Sh NAME
      5 .Nm cols
      6 .Nd columnize output
      7 .Sh SYNOPSIS
      8 .Nm
      9 .Op Fl c Ar num
     10 .Op Ar file ...
     11 .Sh DESCRIPTION
     12 .Nm
     13 reads each
     14 .Ar file
     15 in sequence and writes them to stdout, in as many vertical
     16 columns as will fit in
     17 .Ar num
     18 character columns.
     19 If no
     20 .Ar file
     21 is given,
     22 .Nm
     23 reads from stdin.
     24 .Pp
     25 By default
     26 .Nm cols
     27 tries to figure out the width of the output
     28 device. If that fails, it defaults to 65 chars.
     29 .Sh OPTIONS
     30 .Bl -tag -width Ds
     31 .It Fl c Ar num
     32 Set maximum number of character columns to
     33 .Ar num ,
     34 unless input lines exceed this limit.
     35 .El
     36 .Sh ENVIRONMENT
     37 .Bl -tag -width Ds
     38 .It COLUMNS
     39 The width of the output device.
     40 .El
     41 .Sh HISTORY
     42 .Nm
     43 is similar to
     44 .Xr mc 1
     45 in Plan 9. It was renamed to
     46 .Nm
     47 to avoid the name collision with the popular file manager
     48 Midnight Commander.
     49 .Sh CAVEATS
     50 This implementation of
     51 .Nm
     52 assumes that each UTF-8 code point occupies one character cell,
     53 and thus mishandles TAB characters (among others).
     54 .Pp
     55 .Nm
     56 currently mangles files which contain embedded NULs.