2 ms·
I work with csv files a lot. I have a short awk script which truncates/pads each column to a fixed width which I can specify at runtime. It also repeats the top
by nonesuchluck 7y ago
I work with csv files a lot. I have a short awk script which truncates/pads each column to a fixed width which I can specify at runtime. It also repeats the top column (headers) every 20 rows in a different ANSI color. I pipe the output to less -SR for interactive use so I can scan delimited data in a scrollable grid, with all columns aligned and labeled.
I understand there's vim plugins for this, but, ehh.
- JdeBP 7y agoThere's also the likes of console-flat-table-viewer . One would have to convert the comma-separated stuff into one of the table types, but that's what Miller is for. (-: * http://jdebp.uk./Softwares/nosh/guide/commands/console-flat-table-viewer.xml http://jdebp.uk./Softwares/nosh/guide/commands/console-flat-... * http://johnkerl.org/miller/ http://johnkerl.org/miller/