Version 9 of tabulate

Updated 2015-08-31 21:02:23 by ak

tabulate is a command line utility that converts standard input into pretty-printed tables. It is also a Tcl module that does the same with lists of lists. It was inspired by https://github.com/joepvd/table . It works in Tcl 8.5+ and Jim Tcl.

It is currently developed as part of the Sqawk repository.

Download the latest version: curl https://raw.githubusercontent.com/dbohdan/sqawk/master/lib/tabulate.tcl > tabulate.tcl

Use example

$ ps | jimsh ./tabulate.tcl   
┌─────┬─────┬────────┬─────┐
│ PID │ TTY │  TIME  │ CMD │
├─────┼─────┼────────┼─────┤
│20583│pts/3│00:00:01│ zsh │
├─────┼─────┼────────┼─────┤
│23301│pts/3│00:00:00│  ne │
├─────┼─────┼────────┼─────┤
│28007│pts/3│00:00:00│  ps │
├─────┼─────┼────────┼─────┤
│28008│pts/3│00:00:00│jimsh│
└─────┴─────┴────────┴─────┘

Code

See https://github.com/dbohdan/sqawk/blob/master/lib/tabulate.tcl .

See also

  * [report]
  * [http://core.tcl.tk/tcllib/doc/trunk/embedded/www/tcllib/files/modules/report/report.html#section7%|%Report examples]