Data is stored or generated in various formats but for a human, reading tabular data in a table format is often desired. Depending on your data, there are different options
When we output it with csvlook, we have much better experience
Generic approach
column is a utility tool that outputs given data in column format. Using the -t flag, the data is output in table format. It defaults to splitting at whitespace but it can be customised with -s [delimiter] flag.
Let’s say we have some version data like this
we can format it with
Depending on which version of column you have, you maybe able provide column headers with -N flag:
Note
-N flag does not work with the column command that ships with macos.
Tip
Did you know you can subscribe to GitHub commits via RSS? It’s very handy for TIL repositories for learning cool stuff daily.