Column

From Leo's Notes
Revision as of 22:45, 14 August 2020 by Leo (talk | contribs) (Created page with "Column is a utility that formats data into neat columns. Rather than relying on inserting the proper number of spaces or tabs, you can pipe your output through column to have...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This page was last edited on 14 August 2020, at 22:45.

Column is a utility that formats data into neat columns. Rather than relying on inserting the proper number of spaces or tabs, you can pipe your output through column to have the output look spectacular.

I added this page because I keep on forgetting how to print neat columns since I get it confused with col.

Usage

Just pipe whatever you want columnized through column -t.

% for i in apple orange banana pear ; do echo $i "\$0.00" ; done | column -t
apple   $0.00
orange  $0.00
banana  $0.00
pear    $0.00