The csvlens is a command line tool specifically designed for viewing CSV (Comma-Separated Values) files. It offers a range of functionalities that make it easy to inspect and navigate through the contents of CSV files. It works like the less command but is made specifically for CSV files. This tutorial shows how to install csvlens on Ubuntu 24.04.
Install csvlens
Download the newest version of csvlens from GitHub:
wget -qO csvlens.tar.xz https://github.com/YS-L/csvlens/releases/latest/download/csvlens-x86_64-unknown-linux-gnu.tar.xzCreate temporary directory and extract a tar.xz file:
mkdir csvlens-temptar xf csvlens.tar.xz --strip-components=1 -C csvlens-tempPlace the executable in the /usr/local/bin directory:
sudo mv csvlens-temp/csvlens /usr/local/binWe can check csvlens version with command:
csvlens --versionDelete the downloaded file and the temporary directory:
rm -rf csvlens.tar.xz csvlens-tempTesting csvlens
Create simple CSV file:
echo -e 'name,age\nJohn,25\nJames,29\nOliver,35\nEmma,31' > test.csvExecute csvlens command with the CSV file name as an argument:
csvlens test.csvNow, you can navigate through the CSV file to view different parts of the data. Use the arrow keys to scroll through the content. Press the q key to exit the viewer.
 
Uninstall csvlens
To remove csvlens completely, delete its corresponding file:
sudo rm -rf /usr/local/bin/csvlens 
             
                         
                         
                        
Leave a Comment
Cancel reply