columns(1)
πΈ columns(1) β Columnize Input Text πΈ
okay so bestie, welcome to columns, a lil User Command that takes your input text and makes it all neat and column-y β¨ it's giving organization, it's giving aesthetic, it's giving "my terminal has never looked this good". let's get into it π
π« NAME π«
columns β Columnize Input Text
β¨ SYNOPSIS β¨
columns [-flags] [-flag [value]] [--option-name[[=| ]value]]
All arguments must be options. like, all of them. no stray positional args here, bestie, it's options only periodt π
π¦ DESCRIPTION π¦
There is no description for this command.
fr fr, that's literally what the page says. not me making stuff up, i would never π
π OPTIONS π
π Specify the output dimensions π
-W num,--width=numβ Maximum Line Width. this one takes an integer number as its argument, okay? and the value ofnumis constrained to being:- in the range
16through4095 - The default
numfor this option is:79
- in the range
so this sets the full width of the output line, start-of-line indentation included (yes, including it, no sneaky extra space). the output will fill each line as completely as it possibly can, unless you've already explicitly specified the column width. and heads up: if the maximum width is less than the length of the widest input, you will get a single column of output. one sad lil column. that's just how it is π
-c count,--columns=countβ Desired number of columns. takes an integer number as its argument, and the value ofcountis constrained to being:- in the range
1through2048 - The default
countfor this option is:0
- in the range
use this when you want to specify exactly how many columns to produce. but plot twist: if that many columns will not fit within line_width, then the count will be reduced to the number that fit. the math said no π«Ά
-w num,--col-width=numβ Set width of each column. integer argument, and the value ofnumis constrained to being:- in the range
1through2048 - The default
numfor this option is:0
- in the range
this one says exactly how many characters get allocated for each column. but if it's narrower than the widest entry, it will be over-ridden with the required width. the widest entry said "actually no" π
--tab-width=numβ tab width. takes an integer number as its argument. The defaultnumfor this option is:8
if an indentation string contains tabs, then this value is used to compute the ending column of the prefix string. tab math, but make it cute π
πΈ Specify how to lay out the text πΈ
--spread=numβ maximum spread added to column width. integer argument, and the value ofnumis constrained to being:- in the range
1through1024 - The default
numfor this option is:0
- in the range
use this to specify exactly how many characters may be added to each column. it lets you prevent columns from becoming too far apart β no one wants columns that ghost each other across the whole terminal. without this option, columns will attempt to widen columns to fill the full width. they're overachievers like that π
--fillβ Fill lines with input. this option must not appear in combination with any of the following options:spread,col_width,by_columns.
instead of columnizing the input text, fill the output lines with the input lines. blank lines on input will cause a blank line in the output, unless the output is sorted. with sorted output, blank lines are ignored. so like, sorted mode is the one that doesn't care about your blank lines bestie, it's above that π
-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. cute, right? one option, two moods β¨
--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. and here's the tea: if its length exceeds indent, then it will be emitted on a line by itself, suffixed by any line separation string. for example:
$ columns --first='#define TABLE' -c 2 -I4 --line=' Β΄ <<_EOF_
one
two
three
four
_EOF_
#define TABLE one two three four
see how it did that?? iconic behavior honestly π
-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. fancy π
-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. classic list energy, no trailing comma drama π
--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. again: all but last, the last one is special and gets nothing π¦
--ending=end-strβ string at end of last line.
this option puts the specified string at the end of the output. the final bow, the mic drop, the π
β Specify the ordering of the entries β
--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. and the final column, instead of the final row, may be shorter than the others. so the shortness moves, it doesn't disappear, iykyk π«Ά
-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. and if the pattern starts with or consists of an asterisk (*), then the sort is case insensitive. asterisk = no caps discrimination, we love to see it β¨
π§ Redirecting stdin to an alternate file π§
-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. so it's a filter by default, and this is the "actually, read from here" button π
-?,--helpβ Display usage information and exit.-!,--more-helpβ Pass the extended usage information through a pager.-> [cfgfile],--save-opts [=cfgfile]β Save the option state tocfgfile. The default is the last configuration file listed in the OPTION PRESETS section, below. The command will exit after updating the config file. like, it saves and then dips, no further work, bye π-< cfgfile,--load-opts=cfgfile,--no-load-optsβ Load options fromcfgfile. Theno-load-optsform will disable the loading of earlier config/rc/ini files.--no-load-optsis handled early, out of order. yes bestie, out of order, it's built different π€-v [{v|c|n --version [{v|c|n}]}]β Output version of program and exit. The default mode isv, a simple version. Thecmode will print copyright information andnwill print the full copyright notice. pick your vibe: v for simple, c for copyright, n for the full notice π
π OPTION PRESETS π
Any option that is not marked as not presettable may be preset by loading values from configuration ("RC" or ".INI") file(s) and values from environment variables named:
COLUMNS_<option-name> or COLUMNS
The environmental presets take precedence (are processed later than) the configuration files. so env vars win, they show up fashionably late and still get the final say π
The homerc files are ., and $HOME. If any of these are directories, then the file .columnsrc is searched for within those directories.
π ENVIRONMENT π
See OPTION PRESETS for configuration environment variables.
π FILES π
See OPTION PRESETS for configuration files.
π¦ EXIT STATUS π¦
One of the following exit values will be returned:
0(EXIT_SUCCESS) β Successful program execution. slay β¨1(EXIT_FAILURE) β The operation failed or the command syntax was not valid. oop π66(EX_NOINPUT) β A specified configuration file could not be loaded. the file said "not today" π70(EX_SOFTWARE) βliboptshad an internal operational error. Please report it toautogen-users@lists.sourceforge.net. Thank you. π
π SEE ALSO π
This program is documented more fully in the Columns section of the Add-On chapter in the AutoGen Info system documentation. go read the full lore bestie π
π AUTHORS π
Bruce Korb
π COPYRIGHT π
Copyright (C) 1999-2017 Bruce Korb all rights reserved. This program is released under the terms of the GNU General Public License, version 3 or later.
π₯ BUGS π₯
Please send bug reports to: autogen-users@lists.sourceforge.net
π NOTES π
This manual page was AutoGen-erated from the columns option definitions. yes, "AutoGen-erated", it's a whole thing, and honestly? iconic wordplay π
and that's the whole page bestie!! π this one came from GNU AutoGen (1.2), dated 2018-08-26 β so like, keep that in mind if you're out here reading columns(1) from an old copy. now go columnize something and make it beautiful β¨π
π¦
π¦ where this page comes from
- debian trixie: autogen 1:5.18.16-7 Β· GPL-3.0-or-later
- nixpkgs unstable: autogen 5.18.16
- ubuntu questing: autogen 1:5.18.16-7build1
- ubuntu resolute: autogen 1:5.18.16-7build2 Β· GPL-3.0-or-later
- ubuntu stonking: autogen 1:5.18.16-9 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms