I have some data in text format organized as follows
I want to do database (sql) like operations on this data. For example,
- I want to find all the entries that have a particular value in field_2 and then use the hits to sum up the values in field_8
- I want to find all the entries that have a particular value in field_2 and filed_7
- If the values in the first column are dates, I want to find all the entries in field1 that are in a given date range
These are just a few examples... and the actual operations can be more complex.
The data is used only by myself. I will be the only person updating/deleting the entries.
Is there a simple way to achieve what I am after?
I looked at mysql (http://zetcode.com/databases/mysqltutorial/
), but there the configuration seems to focus on having a central database that could be shared across different users. This does not work for me for three reasons:
1) I want the data to be stored in my home directory. So, I can backup the data as I please.
2) I want the data to be in text format. Since some times, I do sed/grep/awk the data myself. Also, this helps me to edit the data file directly using editors such as vim.
3) I do not have root access and am trying to avoid compiling large software applications.
Any ideas, pointers to existing code (perl scripts?) are much appreciated.