Command line utility to format and display CSV.






$ git clone
$ cd table
$ su

If you have djb redo:

# redo install

if you don't:

# ./do install

Persistent build configuration file

The file config.redo will be sourced when building targets which also accept configuration through environment variables. For example, CC and PREFIX are specified in config.redo.


Replace gcc in CC with cc and add -D_BSD_SOURCE, eg:

# CC='cc -g -Wall -pedantic -std=c99 -D_POSIX_C_SOURCE=200809L
	./do install

and change MANPREFIX to


Install (Arch)

$ <aur_helper> -S table


Periodically display CPU load information in a single-line table

$ watch "table /proc/loadavg -d ' ' -c 50 -n -s ss"

Format a long list of files in the current directory in a double line table with single-line column divisors

$ LC_ALL=C ls -l | tail -n +2 | sed -e 's/ \+/ /g' | table -d ' ' -n

Print information from /etc/passwd in a table:

$ table -n -d : -f 3:1:1:1:4:4:4 /etc/passwd

Same as above, without borders and with different column alignment:

$ table -n -H -d: -arccclll -see -f3:1:1:1:4:4:4 /etc/passwd

Configuring GNU Midnight Commander (mc)

GNU Midnight Commander file manager can be configured to use table as a

viewer (F3) for CSV files. To do that, edit /usr/lib/mc/ext.d/ (or make and edit a local copy, for example in ~/bin/, which we will assume here) so that

case "${filetype}" in

block in do_view_action() function includes:

        table -m -n "${MC_EXT_FILENAME}"

You also need to edit extension file (Command->Edit extension file) or just edit ~/.config/mc/mc.ext and add the lines:

        View=%view{ascii} ~/bin/ view csv %var{PAGER:more}

before includes and default target.

Bonus – TSV viewer: include

        tsvtable -m -n "${MC_EXT_FILENAME}"

in ~/bin/ and

	View=%view{ascii} ~/bin/ view tsv %var{PAGER:more}

in ~/.config/mc/mc.ext.

Configuring ranger file manager

ranger file manager can be configured to use table as a CSV file viewer. To do that, add the following to ~/.config/ranger/, within the function handle_extension():
## CSV
    table -m "${FILE_PATH}" && exit 5
    exit 1;;

Bonus – TSV viewer:

## TSV
    tsvtable -m "${FILE_PATH}" && exit 5
    exit 1;;

Configuring vifm

vifm file manager can also be configured to use table as a CSV file

viewer. To accomplish this, add the following lines to ~/.config/vifm/vifmrc:

fileviewer *.csv
	\ table -m %c

Bonus – TSV viewer:

fileviewer *.tsv
	\ tsvtable -m %c


See git log for details.


table - Command line utility to format and display CSV.
Copyright © 2020-2023 Страхиња Радић

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see

Generated by slweb © 2020-2023 Strahinya Radich.