column - columnate lists ( a verb. not a noun COLUMNS)

column [-tx ] [-c width] [-s sep] [file …]

Formats its input into multiple columns by removing sep and inserting spaces or [TAB] 0x09 characters to try to align columns!

Default: Rows are filled down before columns across.
↓1  4  7  
 2  5  8
 3  6  
-x columns across before filling rows down.
 1 →  2   3   
 4    5   6   
 7    8   
-c width total width of display in characters ( even if output is to a file)
default COLUMNS environment variable.
            some telnet programs change COLUMNS if screen size is changed.
-t Determine the number of columns the input contains and create a table.
-s sep set of characters to delimit columns for -t . default whitespace (?)
> cat 0
AFPServer:AFPUserAliases:Aliases:AppleMetaRecord:Augments:Automount:AutomountMap
> column 0
AFPServer:AFPUserAliases:Aliases:AppleMetaRecord:Augments:Automount:AutomountMap 
> column -s : 0
AFPServer:AFPUserAliases:Aliases:AppleMetaRecord:Augments:Automount:AutomountMap  ??
> column -c 40 -s : 0
AFPServer:AFPUserAliases:Aliases:AppleMetaRecord:Augments:Automount:AutomountMap  ??
> column -c 40 -ts : 0
AFPServer  AFPUserAliases  Aliases  AppleMetaRecord  Augments  Automount  AutomountMap
Empty lines are ignored.

Column exits 0 on success, >0 if an error occurred.

ENVIRONMENT
COLUMNS defines width

EXAMPLES

> (printf "PERM LINKS OWNER GROUP SIZE MONTH DAY HH:MM/YEAR NAME\n" \
  ; /bin/ls -l | /bin/sed 1d    ) | column -t  
PERM        LINKS  OWNER     GROUP    SIZE    MONTH  DAY  HH:MM/YEAR  NAME
-rw-r--r--  1      me        users    1613    Feb    9    17:28       0
-rwxr-xr-x  1      me        users    650     Nov    5    08:29       0.pl
-rw-r--r--  1      me        users    1470    Feb    9    17:28       00
-rw-r--r--  1      me        users    712     Oct    1    17:07       0920a
-rw-r--r--  1      me        users    658     Oct    1    17:07       0920b
-rw-r--r--  1      me        users    299     Jun    11   2007        0badPairing.txt
-rw-r--r--  1      me        users    151     Dec    15   2007        0datetime.txt
( sed 1d deletes TOTAL .. line )
 

SEE ALSO colrm, ls , paste, sort, col stty oxtabs (-oxtabs). Expand (do not expand) tabs to spaces on output.