snippetbashTip
jtbl — Utility to print JSON and JSON Lines data as a table in the terminal. More information: <https://git
Viewed 0 times
commandandcliprintjsonutilityjtbl
Problem
How to use the
jtbl command: Utility to print JSON and JSON Lines data as a table in the terminal. More information: <https://github.com/kellyjonbrazil/jtbl#usage>.Solution
jtbl — Utility to print JSON and JSON Lines data as a table in the terminal. More information: <https://github.com/kellyjonbrazil/jtbl#usage>.Print a table from JSON or JSON Lines input:
cat {{file.json}} | jtblPrint a table and specify the column width for wrapping:
cat {{file.json}} | jtbl --cols={{width}}Print a table and truncate rows instead of wrapping:
cat {{file.json}} | jtbl {{[-t|--truncate]}}Print a table and don't wrap or truncate rows:
cat {{file.json}} | jtbl {{[-n|--no-wrap]}}Code Snippets
Print a table from JSON or JSON Lines input
cat {{file.json}} | jtblPrint a table and specify the column width for wrapping
cat {{file.json}} | jtbl --cols={{width}}Print a table and truncate rows instead of wrapping
cat {{file.json}} | jtbl {{[-t|--truncate]}}Print a table and don't wrap or truncate rows
cat {{file.json}} | jtbl {{[-n|--no-wrap]}}Context
tldr-pages: common/jtbl
Revisions (0)
No revisions yet.