table
Command line utility to format and display CSV.
Manual
See
https://strahinja.srht.site/man/table/table.1.html
Prerequisites
- C compiler defaults in config.mk (HaikuOS needs Clang/LLVM)
Install
with
Persistent build configuration file
The file config.mk will be sourced when building targets which also accept configuration through environment variables. For example, CC and PREFIX can be specified in config.mk.
Initially, there will be no config.mk, you will need to copy one of the customized config.* files or write your own:
Install (Arch)
Examples
Periodically display CPU load information in a single-line table
Format a long list of files in the current directory in a double line table with single-line column divisors
Print information from /etc/passwd in a table:
Same as above, without borders and with different column alignment:
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/text.sh (or make and edit a local copy, for example in ~/bin/text.sh, which we will assume here) so that
block in do_view_action() function includes:
You also need to edit extension file (Command->Edit extension file) or just edit ~/.config/mc/mc.ext (before version 4.8.*) and add the lines:
or ~/.config/mc/mc.ext.ini (versions 4.8.* and later):
before includes and default target.
Bonus – TSV viewer: include
in ~/bin/text.sh and (before version 4.8.*)
in ~/.config/mc/mc.ext, or (versions 4.8.* and later):
in ~/.config/mc/mc.ext.ini.
Configuring ranger file manager
can be configured to use table as a CSV file viewer. To do that, add the following to ~/.config/ranger/scope.sh, within the function handle_extension():
Bonus – TSV viewer:
Configuring vifm
can also be configured to use table as a CSV file viewer. To accomplish this, add the following lines to ~/.config/vifm/vifmrc:
Bonus – TSV viewer:
Changelog
See git log for more information.
License
table - Command line utility to format and display CSV.
Copyright (C) 2020-2026 Страхиња Радић
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