Back to the command reference

column

ShellFundamentals In simulator In real Linux

Format input into aligned columns

Name: column

You can practise it right away in the simulator, and use it in real Linux mode too.

Description

column formats input into neat columns. -t detects the fields of each line and aligns them as a table, -s sets the input separator; great for making output or CSV readable.

Syntax

column [OPTION]... [FILE]...

Common options

-t / --tableCreate a table
-s / --separator SEPInput separator
-o / --output-separator STRINGSeparate output columns with STRING (two spaces by default)
-N / --table-columns NAMESName the columns (comma-separated); shown as a header
-x / --fillrowsFill rows before columns

Examples

  • $ column -t -s, data.csv

    Show a CSV as an aligned table

    Explain
  • $ mount | column -t

    Make output easier to read

    Explain

Related