3 ms·
Another trick along these lines is to cut out the middleman (middleprogram? middleware?) and use SQLite to do it: $ sqlite3 sqlite3> .mode csv sqli
by yellowapple 8y ago
Another trick along these lines is to cut out the middleman (middleprogram? middleware?) and use SQLite to do it:
$ sqlite3
sqlite3> .mode csv
sqlite3> .import foo.csv foo
sqlite3> SELECT * FROM foo WHERE bar = 'baz'; -- you get the gist...
(a bunch of rows)
Q seems to be much easier to use (and certainly easier to remember), but I've always found it handy to have the full power of SQL at my fingertips when needing to do a bunch of CSV manipulations.
- pixelmonkey 8y agoI think the csvkit CLI tool, csvsql, provides this functionality, too.