Forrest logo
back to the cat tool

jtbl:tldr:18569

jtbl: Print a table from JSON or JSON Lines input.
$ cat ${file-json} | jtbl
try on your machine

This command is a combination of two commands using the pipe operator "|" to chain them together.

  1. cat ${file-json}: This command uses the cat command to read the contents of a file specified by the variable ${file-json}. The ${file-json} is a placeholder for the actual file name or path. It is expanded to the file name or path before executing the command. The cat command then outputs the contents of the file to the standard output.

  2. jtbl: This command is executed on the output of the previous cat command. It is a command-line utility used to format JSON data in a tabular form. It takes the JSON input from the standard input and converts it into a human-readable table format, which is then displayed on the terminal.

So overall, this command first reads the contents of a JSON file and then passes that data to the jtbl command to format it as a table for easier readability.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the cat tool