SELECT is an SQL interface to text files:

$ SELECT response_code, count\(1\) FROM access_log WHERE method = "'GET'" \
> GROUP BY response_code ORDER BY 2 DESC
 response_code | count(1)
---------------+----------
 200           | 157820
 404           | 25138
 304           | 17938
 301           | 2348
 302           | 1486
 206           | 673
 405           | 16
 401           | 15
 500           | 8
 403           | 1
$ head -1 access_log
pd90b3592.dip.t-dialin.net - - [23/Sep/2007:22:42:04 +0200] "GET / HTTP/1.1" 200
 768 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20061201 Fir
efox/2.0.0.6 (Ubuntu-feisty)"

SELECT currently specificially supports the NCSA extended/combined
transfer log format (access_log), and all other text files
generically. It is easily extensible to support other text file
formats. SELECT is licensed under the GPL Version 3. It uses SQLite as
its backend.

Download

http://select.mbertheau.de/files/SELECT-0.1.tar.bz2

Installation

SELECT requires Python and pysqlite2. Python 2.5 includes pysqlite2.

Download and unpack the tarball and copy SELECT to a directory in your
$PATH, for example /usr/local/bin:

$ wget http://select.mbertheau.de/files/SELECT-0.1.tar.bz2
$ tar xfj SELECT-0.1.tar.bz2
$ sudo cp SELECT-0.1/SELECT /usr/local/bin

Further information at http://select.mbertheau.de/

Feel free to write me or leave a comment on the announcement:

http://www.bluetwanger.de/blog/2008/02/25/sql-queries-on-text-files/

Markus Bertheau

-- 
Markus Bertheau <[EMAIL PROTECTED]>
Blog: http://www.bluetwanger.de/blog/
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to