[Shell command] Align simple CSV columns in the terminal

Created on November 30, 2026

You can use column to display a simple comma-separated file as a table. Save this example as dummy.csv.

Tokyo,1500
Saitama,20
Hokkaido,30000
column -s ',' -t < dummy.csv

-s ',' sets the input separator to a comma. -t calculates column widths and pads the fields for display.

Tokyo     1500
Saitama   20
Hokkaido  30000

This works for data where every comma separates fields. Use a CSV parser for files with quoted fields that contain commas or line breaks.

Shell command