Anyone know of a command-line CSV viewer for Linux/OS X? I’m thinking of something like less but that spaces out the columns in a more readable way. (I’d be fine with opening it with OpenOffice Calc or Excel, but that’s way too overpowered for just looking at the data like I need to.) Having horizontal and vertical scrolling would be great.
Anyone know of a command-line CSV viewer for Linux/OS X? I’m thinking of something
Share
You can also use this:
columnis a standard unix program that is very convenient — it finds the appropriate width of each column, and displays the text as a nicely formatted table.Note: whenever you have empty fields, you need to put some kind of placeholder in it, otherwise the column gets merged with following columns. The following example demonstrates how to use
sedto insert a placeholder:Note that the substitution of
,,for, ,is done twice. If you do it only once,1,,,4will become1, ,,4since the second comma is matched already.