Go to main content

man pages section 1: User Commands

Exit Print View

Updated: July 2017
 
 

columns (1)

Name

columns - Columnize Input Text

Synopsis

columns [-flag [value]]... [--opt-name [[=| ]value]]...

All arguments must be options.

Description

COLUMNS(1)                    Programmer's Manual                   COLUMNS(1)



NAME
       columns - Columnize Input Text

SYNOPSIS
       columns [-flag [value]]... [--opt-name [[=| ]value]]...

       All arguments must be options.

DESCRIPTION
       This manual page documents, briefly, the columns command.  This program
       was designed for the purpose of generating compact, columnized  tables.
       It will read a list of text items from standard in or a specified input
       file and produce a columnized  listing  of  all  the  non-blank  lines.
       Leading white space on each line is preserved, but trailing white space
       is stripped.  Methods of applying per-entry and per-line embellishments
       are provided.  See the formatting and separation arguments below.

       This  program is used by AutoGen to help clean up and organize its out-
       put.

OPTIONS
       -W num, --width=num
              Maximum Line Width.  This option takes an integer number as  its
              argument.  The default num for this option is:
                   79

              This option specifies the full width of the output line, includ-
              ing any start-of-line indentation.  The output  will  fill  each
              line as completely as possible, unless the column width has been
              explicitly specified.  If the maximum width  is  less  than  the
              length of the widest input, you will get a single column of out-
              put.

       -c count, --columns=count
              Desired number of columns.  This option takes an integer  number
              as its argument.  The default count for this option is:
                   0

              Use  this option to specify exactly how many columns to produce.
              If that many columns will not fit within  line_width,  then  the
              count will be reduced to the number that fit.

       -w num, --col-width=num
              Set  width  of each column.  This option takes an integer number
              as its argument.  The default num for this option is:
                   0

              Use this option to specify exactly how many characters are to be
              allocated  for  each  column.  If it is narrower than the widest
              entry, it will be over-ridden with the required width.

       --spread=num
              maximum spread added to column  width.   This  option  takes  an
              integer number as its argument.  The default num for this option
              is:
                   0

              Use this option to specify exactly how many  characters  may  be
              added  to  each  column.   It allows you to prevent columns from
              becoming too far apart.

       -I l-pfx, --indent=l-pfx
              Line prefix or indentation.

              If a number, then this many spaces will be inserted at the start
              of  every  line.   Otherwise,  it  is a line prefix that will be
              inserted at the start of every line.

       --first-indent=l-pfx
              First line prefix.  This option must appear in combination  with
              the following options: indent.

              If a number, then this many spaces will be inserted at the start
              of the first line.  Otherwise, it is a line prefix that will  be
              inserted at the start of that line.

       --tab-width=num
              tab width.  This option takes an integer number as its argument.
              The default num for this option is:
                   8

              If an indentation string contains tabs, then this value is  used
              to compute the ending column of the prefix string.

       -s key-pat, --sort[=key-pat]
              Sort input text.

              Causes the input text to be sorted.  If an argument is supplied,
              it is presumed to be a pattern and the sort is  based  upon  the
              matched  text.   If  the  pattern  starts with or consists of an
              asterisk (*), then the sort is case insensitive.

       -f fmt-str, --format=fmt-str
              Formatting string for each input.

              If you need to reformat each input text, the  argument  to  this
              option  is  interpreted  as an sprintf(3) format that is used to
              produce each output entry.

       -S sep-str, --separation=sep-str
              Separation string - follows all but last.

              Use this option if, for example, you  wish  a  comma  to  appear
              after each entry except the last.

       --line-separation=sep-str
              string at end of all lines but last.

              Use  this option if, for example, you wish a backslash to appear
              at the end of every line, except the last.

       --by-columns
              Print entries in column order.

              Normally, the entries are printed out in order by rows and  then
              columns.   This  option  will  cause  the  entries to be ordered
              within columns.  The final column, instead of the final row, may
              be shorter than the others.

       -i file, --input=file
              Input file (if not stdin).

              This  program  normally  runs as a filter, reading from standard
              input, columnizing and writing to  standard  out.   This  option
              redirects input to a file.

       -?, --help
              Display usage information and exit.

       -!, --more-help
              Extended usage information passed thru pager.

       -v [{v|c|n}], --version[={v|c|n}]
              Output  version of program and exit.  The default mode is `v', a
              simple version.  The `c' mode will print  copyright  information
              and `n' will print the full copyright notice.


ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:


       +---------------+-------------------------+
       |ATTRIBUTE TYPE |    ATTRIBUTE VALUE      |
       +---------------+-------------------------+
       |Availability   | developer/build/autogen |
       +---------------+-------------------------+
       |Stability      | Uncommitted             |
       +---------------+-------------------------+
SEE ALSO
       This  program  is  documented  more fully in the Columns section of the
       Add-On chapter in the AutoGen Info system documentation.

AUTHOR
       Bruce Korb
       Please send bug reports to:  autogen-users@lists.sourceforge.net


       Released under the GNU General Public License.

       This manual page was AutoGen-erated from  the  columns  option  defini-
       tions.



NOTES
       This     software     was    built    from    source    available    at
       https://java.net/projects/solaris-userland.   The  original   community
       source was downloaded from  http://ftp.gnu.org/gnu/autogen/rel5.9/auto-
       gen-5.9.tar.gz

       Further information about this software can be found on the open source
       community website at http://www.gnu.org/software/autogen/.



(GNU AutoGen 1.1)                 2015-08-19                        COLUMNS(1)