Column: Difference between revisions
From Leo's Notes
This page was last edited on 30 December 2021, at 00:49.
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..." |
m Added categories and navbox |
||
| Line 13: | Line 13: | ||
| lang = terminal | | lang = terminal | ||
}} | }} | ||
{{Navbox Linux}} | |||
[[Category:Linux]] | |||
[[Category:LinuxUtilities]] | |||
Revision as of 00:49, 30 December 2021
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