Install zsv CSV Processing Tool on Ubuntu 26.04

Install zsv CSV Processing Tool on Ubuntu 26.04

The zsv is a command-line tool designed for working with CSV datasets. It provides fast and efficient methods for formatting, inspecting, and processing comma-separated values directly from the terminal. This tutorial shows how to install zsv CSV processing tool on Ubuntu 26.04.

Install zsv

First, obtain the latest release version from the GitHub repository and store it in a variable:

ZSV_VERSION=$(curl -s "https://api.github.com/repos/liquidaty/zsv/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')

Next, download the archive containing the precompiled binary:

curl -sSLo zsv.tar.gz https://github.com/liquidaty/zsv/releases/latest/download/zsv-$ZSV_VERSION-amd64-linux-gcc.tar.gz

Extract the executable and place it in the /usr/local/bin:

sudo tar xf zsv.tar.gz --strip-components=2 -C /usr/local/bin amd64-linux-gcc/bin/zsv

Verify that the installation completed successfully by checking zsv version:

zsv version

After confirmation, remove the downloaded archive:

rm -rf zsv.tar.gz

Testing zsv

Create a small CSV file for demonstration purposes:

echo -e 'name,age\nJohn,25\nJames,29\nOliver,35\nEmma,31' > test.csv

Use the pretty option to display the contents in a readable table format:

zsv pretty test.csv

Example output:

name  |age
John  |25
James |29
Oliver|35
Emma  |31

Uninstall zsv

To uninstall zsv from the system, delete the installed binary:

sudo rm -rf /usr/local/bin/zsv

Leave a Comment

Cancel reply

Your email address will not be published.