Linux utilities for managing .csv files

Yes csvkit package includes all the following programs

csv2rec, csvclean, csvcut, csvformat, csvgrep, csvjoin, csvjson, csvlook, csvpy, csvsort, csvsql, csvstack, csvstat, in2csv, pedigree, rec2csv.

They each have a man page, and there is an html document here
file:///usr/share/doc/csvkit/html/index.html
provided you also install the package csvkit-doc

3 Likes

Is there much to seperate this app from libreoffice calc ? They look and feel the same
Similar with writer and abiword

I suspect gnumeric may not have some of the fancier features. I have never found anything missing, but I dont use spreadsheets a lot.
I mostly want to look at old Excel files and maybe write them to .csv files

Ah thanks, good to know. I’ll give it whirl on your recommendation using your instructions up the topic.
What’s the purpose behind miller and is it essential to install with csvkit?

1 Like

I am not expert on miller. You dont need to install miller with csvkit, it is an independent utility.

Miller seems to aim to allow you to use things like awk, sed, grep with .csv files.

5 Likes

Ah, that makes sense. My csv needs are minor so probably of no real interest in that case.

1 Like

Unless you are already root, shouldn’t your code example include sudo?

1 Like

Yes, of course.
I never use sudo, always become root, so I tend to forget when writing.
In the early days of Unix (BSD) sudo did not exist… the only way was to become root. I never changed to sudo.

3 Likes

all well and good for an experienced user like yourself but there be dragons for the less wary and capable!

2 Likes

I really dont see the difference for a home computer.
You have to be careful either way.
At work, on a multiuser server, it is a different matter.

3 Likes

A more useful guide I’ve found to using csvkit:

4 Likes

Thank you, that is well written.

3 Likes

Yes, I needed to find one because after doing the install I did csvkit --version and it returned command not found so I doubted whether I’d actually installed it but then doing apt list --installed I found that it was there after all so decided to dig deeper.
I’ll now take some time to explore it a bit more.

3 Likes

That is because csvkit is not a command… it is only the package name.
Confusing… yes… in many cases the command name and the package name are the same… but not all.

3 Likes

for reference - the csvkit --version command was obtained from a post on Stack Exchange - usually a reliable resource.

3 Likes

Try apt-cache show csvkit
That will give the version of a package

3 Likes

yes, that worked but gives Version: 1.0.7-1. but isn’t there a more up-to-date version (as in 2.1.0 - the link I provided earlier)?

1 Like

Mine is the same.
Debian package versions are often behind what you can download from the developers site.
You should stick with the Debian version… it has been checked for compatability. The developers version will be bleeding edge. Try it if you like , but be prepared for gliches… and virus scan it if you download from anywhere other than Debian.

3 Likes

No, I’m comfortable with the version and usually avoid bleeding edge for my daily driver but thought I would simply mention it in the event that someone else less appreciative of the ā€œstableā€ label given to Debian encounters it.
Incidentally, as regards the other topic under discussion about Snaps and Flatpaks, Debian ships a ā€œstableā€ version of FF (ESR) but taking that off and replacing with the Flatpak version (administered by Mozilla themselves anyway) is conventionally regarded as a sound move.

1 Like

Good to know, thanks.
Browsers are a bit of an exception. They need to be more uptodate for security and for viewing modern webpages.

1 Like