column
Overview
column formats text into aligned columns or tables. Great for making mount, ls, or script output human-readable.
Syntax
column [options] [file...]Common Options
| Option | Description |
|---|---|
-t |
Create a table (whitespace → columns) |
-s sep |
Input separator for -t |
-o sep |
Output separator |
-x |
Fill columns before rows |
-n |
Do not merge empty columns (util-linux) |
Key Use Cases
- Pretty-print tabular CLI output
- Align CSV/TSV for reading
- Format script reports
Examples with Explanations
Table mode
mount | column -tAligns mount table fields for eyeballing.
CSV to table
column -t -s, contacts.csvUse comma as input separator.
From a pipeline
printf 'name age\nalice 30\nbob 2\n' | column -tQuick aligned report.
Notes & Pitfalls
- util-linux
columnfeatures vary slightly by version; checkcolumn --help.