View Single Post
chemist's Avatar
Administrator | Posts: 1,036 | Thanked: 2,019 times | Joined on Sep 2009 @ Germany
#4
That a proper search function is missing is... I just do not understand!
If you backup your contact's you can grep it with an xterminal.

Code:
grep -r $part_of_number $path_to_backup
output looks something like this
Code:
$path_to_backup/$contact's_name.vcf :TEL:TYPE=$type : $full_number
as matching file with the full number and as the file name is the contact's name you will find your way.

Also a grep on your abook databases like this
Code:
grep -r -B6 $part_of_number ~/.osso-abook/db/
gives you 6 lines before a number and if you don't have to many numbers with a contact you will see the name within output, this grep includes call-logs (to grep only the abook you have to point directly to it).

further extending to get a good matching output with having it put for a script

Code:
#!/bin/sh
grep -C10 $1 ~/.osso-abook/db/addressbook.db | grep -e N: -e TEL|grep -v VERSION
this gives you 10 lines in each direction of that number to grep the name as it may be before or after that TEL line, to have entries separated I left the BEGIN:VCARD in the output.
USAGE:
Code:
./search_num 135314
I am looking into it to have it display the full vCard later today.


Just found a number in the call-logs I don't have in the abook anymore, with full details.

Last edited by chemist; 2010-06-28 at 11:23.
 

The Following User Says Thank You to chemist For This Useful Post: