Indexing text file content with command line query

Posted by Drew Carlton on Super User See other posts from Super User or by Drew Carlton
Published on 2011-02-20T11:35:10Z Indexed on 2011/02/20 15:27 UTC
Read the original article Hit count: 302

Filed under:
|
|
|

I take daily notes in a plaintext file labeled with date in the YYYYMMDD format. These files are no more than 100 lines long, and are written in a blog style format.

I'd like to be able search these files as if they were blog posts indexed by google, with some phrase query returning the most relevant/recent date filenames, with a snippet containing the relevant part.

Ideally it would be something like this:

#searchindex "laptop no sound"

returns:

20100909.txt:

... laptop sound isn't working...

20100101.txt

... sound is too loud... debating what laptop to buy...

and so on and so forth.

I'm working on a linux platform (Debian with GNOME). I've looked at beagle and tracker, but they just seem complete overkill for what I want.

© Super User or respective owner

Related posts about command-line

Related posts about search