LinuxCommandLibrary

csvlook

Display CSV files in readable, tabular format

TLDR

View a CSV file

$ csvlook [data.csv]
copy

SYNOPSIS

csvlook [options] [file]

PARAMETERS

-I, --no-inference
    Disable type inference (treat all columns as strings).

-n, --names
    Use the specified list of column names instead of the header row (if any).

-e, --encoding
    Specify the file encoding (e.g., utf-8, latin1).

-d, --delimiter
    Field delimiter. Defaults to comma.

-q, --quotechar
    Quote character. Defaults to double quote.

-z, --doublequote
    Double quote fields. Defaults to true.

--escapechar
    Escape character. Defaults to backslash.

-H, --no-header-row
    Suppress the header row from the output.

-l, --max-column-width
    Maximum column width.

-S, --sort
    Sort by the specified column.

DESCRIPTION

The `csvlook` command is a utility designed for rendering CSV (Comma Separated Values) files in a visually appealing, tabular format directly in the terminal. This makes it significantly easier to read and understand CSV data without relying on external spreadsheet applications or complex text editors. It intelligently formats the data, aligning columns for improved readability. It automatically determines column widths based on the content within the CSV, so it can handle files with varying field lengths. Ideal for quickly inspecting data, verifying CSV file content, and displaying results in a presentable way within a command-line environment. It is often a part of a suite of command-line tools for working with CSV data, providing a convenient way to view structured data. It provides a simple and effective solution for working with CSV files from the command line.

CAVEATS

While `csvlook` improves readability, it may not be suitable for very large CSV files due to memory constraints and terminal limitations. Also, heavily formatted or complex CSV files might not render perfectly.

EXAMPLES

Basic Usage:
`csvlook data.csv`

Specifying Delimiter:
`csvlook -d ';' data.csv`

Suppress Header Row:
`csvlook -H data.csv`

SEE ALSO

csvcut(1), csvstat(1), csvgrep(1)

Copied to clipboard